Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 authored September 09, 2011

Showing 1 changed file with 13 additions and 1 deletion. Show diff stats Hide diff stats

  1. 14  django/core/handlers/wsgi.py
14  django/core/handlers/wsgi.py
@@ -16,10 +16,11 @@
16 16
 logger = getLogger('django.request')
17 17
 
18 18
 
19  
-# See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
  19
+# See http://www.iana.org/assignments/http-status-codes
20 20
 STATUS_CODE_TEXT = {
21 21
     100: 'CONTINUE',
22 22
     101: 'SWITCHING PROTOCOLS',
  23
+    102: 'PROCESSING',
23 24
     200: 'OK',
24 25
     201: 'CREATED',
25 26
     202: 'ACCEPTED',
@@ -27,6 +28,9 @@
27 28
     204: 'NO CONTENT',
28 29
     205: 'RESET CONTENT',
29 30
     206: 'PARTIAL CONTENT',
  31
+    207: 'MULTI-STATUS',
  32
+    208: 'ALREADY REPORTED',
  33
+    226: 'IM USED',
30 34
     300: 'MULTIPLE CHOICES',
31 35
     301: 'MOVED PERMANENTLY',
32 36
     302: 'FOUND',
@@ -53,12 +57,20 @@
53 57
     415: 'UNSUPPORTED MEDIA TYPE',
54 58
     416: 'REQUESTED RANGE NOT SATISFIABLE',
55 59
     417: 'EXPECTATION FAILED',
  60
+    422: 'UNPROCESSABLE ENTITY',
  61
+    423: 'LOCKED',
  62
+    424: 'FAILED DEPENDENCY',
  63
+    426: 'UPGRADE REQUIRED',
56 64
     500: 'INTERNAL SERVER ERROR',
57 65
     501: 'NOT IMPLEMENTED',
58 66
     502: 'BAD GATEWAY',
59 67
     503: 'SERVICE UNAVAILABLE',
60 68
     504: 'GATEWAY TIMEOUT',
61 69
     505: 'HTTP VERSION NOT SUPPORTED',
  70
+    506: 'VARIANT ALSO NEGOTIATES',
  71
+    507: 'INSUFFICIENT STORAGE',
  72
+    508: 'LOOP DETECTED',
  73
+    510: 'NOT EXTENDED',
62 74
 }
63 75
 
64 76
 class LimitedStream(object):

0 notes on commit 4584069

Please sign in to comment.
Something went wrong with that request. Please try again.