summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2011-09-09 16:57:35 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2011-09-09 16:57:35 +0000
commit4584069c8aa43a10bef8d0711fc4451599bb4dcf (patch)
treea4c03ffba736e32a24f24edf26fcea5967ad3193 /django/core
parentddaca29d3dc2b4a917a9e527fd90a14ef8bc47e4 (diff)
Fixed #16746 - added more HTTP code/string mappings.
This moves the arbitrary line on which HTTP codes to include away from RFC 2616 and to the IANA assignments, thus picking up WebDAV and a couple others. Thanks to vfaronov for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core')
-rw-r--r--django/core/handlers/wsgi.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py
index 56d2ba631c..a816cadc7b 100644
--- a/django/core/handlers/wsgi.py
+++ b/django/core/handlers/wsgi.py
@@ -16,10 +16,11 @@ from django.utils.log import getLogger
logger = getLogger('django.request')
-# See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
+# See http://www.iana.org/assignments/http-status-codes
STATUS_CODE_TEXT = {
100: 'CONTINUE',
101: 'SWITCHING PROTOCOLS',
+ 102: 'PROCESSING',
200: 'OK',
201: 'CREATED',
202: 'ACCEPTED',
@@ -27,6 +28,9 @@ STATUS_CODE_TEXT = {
204: 'NO CONTENT',
205: 'RESET CONTENT',
206: 'PARTIAL CONTENT',
+ 207: 'MULTI-STATUS',
+ 208: 'ALREADY REPORTED',
+ 226: 'IM USED',
300: 'MULTIPLE CHOICES',
301: 'MOVED PERMANENTLY',
302: 'FOUND',
@@ -53,12 +57,20 @@ STATUS_CODE_TEXT = {
415: 'UNSUPPORTED MEDIA TYPE',
416: 'REQUESTED RANGE NOT SATISFIABLE',
417: 'EXPECTATION FAILED',
+ 422: 'UNPROCESSABLE ENTITY',
+ 423: 'LOCKED',
+ 424: 'FAILED DEPENDENCY',
+ 426: 'UPGRADE REQUIRED',
500: 'INTERNAL SERVER ERROR',
501: 'NOT IMPLEMENTED',
502: 'BAD GATEWAY',
503: 'SERVICE UNAVAILABLE',
504: 'GATEWAY TIMEOUT',
505: 'HTTP VERSION NOT SUPPORTED',
+ 506: 'VARIANT ALSO NEGOTIATES',
+ 507: 'INSUFFICIENT STORAGE',
+ 508: 'LOOP DETECTED',
+ 510: 'NOT EXTENDED',
}
class LimitedStream(object):