Ticket #16746: django-all-reason-phrases.patch

File django-all-reason-phrases.patch, 1.4 KB (added by Vasiliy Faronov, 13 years ago)

Patch to add all IANA registered reason phrases

  • django/core/handlers/wsgi.py

     
    1616logger = getLogger('django.request')
    1717
    1818
    19 # See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
     19# See http://www.iana.org/assignments/http-status-codes
    2020STATUS_CODE_TEXT = {
    2121    100: 'CONTINUE',
    2222    101: 'SWITCHING PROTOCOLS',
     23    102: 'PROCESSING',
    2324    200: 'OK',
    2425    201: 'CREATED',
    2526    202: 'ACCEPTED',
     
    2728    204: 'NO CONTENT',
    2829    205: 'RESET CONTENT',
    2930    206: 'PARTIAL CONTENT',
     31    207: 'MULTI-STATUS',
     32    208: 'ALREADY REPORTED',
     33    226: 'IM USED',
    3034    300: 'MULTIPLE CHOICES',
    3135    301: 'MOVED PERMANENTLY',
    3236    302: 'FOUND',
     
    5357    415: 'UNSUPPORTED MEDIA TYPE',
    5458    416: 'REQUESTED RANGE NOT SATISFIABLE',
    5559    417: 'EXPECTATION FAILED',
     60    422: 'UNPROCESSABLE ENTITY',
     61    423: 'LOCKED',
     62    424: 'FAILED DEPENDENCY',
     63    426: 'UPGRADE REQUIRED',
    5664    500: 'INTERNAL SERVER ERROR',
    5765    501: 'NOT IMPLEMENTED',
    5866    502: 'BAD GATEWAY',
    5967    503: 'SERVICE UNAVAILABLE',
    6068    504: 'GATEWAY TIMEOUT',
    6169    505: 'HTTP VERSION NOT SUPPORTED',
     70    506: 'VARIANT ALSO NEGOTIATES',
     71    507: 'INSUFFICIENT STORAGE',
     72    508: 'LOOP DETECTED',
     73    510: 'NOT EXTENDED',
    6274}
    6375
    6476class LimitedStream(object):
Back to Top