Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 4584069c8aa43a10bef8d0711fc4451599bb4dcf 1 parent ddaca29
Jacob Kaplan-Moss jacobian authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 django/core/handlers/wsgi.py
14 django/core/handlers/wsgi.py
View
@@ -16,10 +16,11 @@
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 @@
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 @@
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):
Please sign in to comment.
Something went wrong with that request. Please try again.