summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-09-13 03:21:44 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-09-13 03:21:44 +0000
commit6e034a831aea204b39f4863eddfbc223a638fb76 (patch)
tree5c561089bbcf7038ba5fc6eecbaf555109e2a0e3
parent63e512f25fdcd74221ee018f2ccce4999d650e2a (diff)
Fixed #481 -- Added all other HTTP status codes to WSGI backend. Thanks, eugene
git-svn-id: http://code.djangoproject.com/svn/django/trunk@636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/handlers/wsgi.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py
index f7c71f61d9..40ea9fb902 100644
--- a/django/core/handlers/wsgi.py
+++ b/django/core/handlers/wsgi.py
@@ -2,10 +2,49 @@ from django.core.handlers.base import BaseHandler
from django.utils import datastructures, httpwrappers
from pprint import pformat
+# See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
STATUS_CODE_TEXT = {
+ 100: 'CONTINUE',
+ 101: 'SWITCHING PROTOCOLS',
200: 'OK',
+ 201: 'CREATED',
+ 202: 'ACCEPTED',
+ 203: 'NON-AUTHORITATIVE INFORMATION',
+ 204: 'NO CONTENT',
+ 205: 'RESET CONTENT',
+ 206: 'PARTIAL CONTENT',
+ 300: 'MULTIPLE CHOICES',
+ 301: 'MOVED PERMANENTLY',
+ 302: 'FOUND',
+ 303: 'SEE OTHER',
+ 304: 'NOT MODIFIED',
+ 305: 'USE PROXY',
+ 306: 'RESERVED',
+ 307: 'TEMPORARY REDIRECT',
+ 400: 'BAD REQUEST',
+ 401: 'UNAUTHORIZED',
+ 402: 'PAYMENT REQUIRED',
+ 403: 'FORBIDDEN',
404: 'NOT FOUND',
+ 405: 'METHOD NOT ALLOWED',
+ 406: 'NOT ACCEPTABLE',
+ 407: 'PROXY AUTHENTICATION REQUIRED',
+ 408: 'REQUEST TIMEOUT',
+ 409: 'CONFLICT',
+ 410: 'GONE',
+ 411: 'LENGTH REQUIRED',
+ 412: 'PRECONDITION FAILED',
+ 413: 'REQUEST ENTITY TOO LARGE',
+ 414: 'REQUEST-URI TOO LONG',
+ 415: 'UNSUPPORTED MEDIA TYPE',
+ 416: 'REQUESTED RANGE NOT SATISFIABLE',
+ 417: 'EXPECTATION FAILED',
500: 'INTERNAL SERVER ERROR',
+ 501: 'NOT IMPLEMENTED',
+ 502: 'BAD GATEWAY',
+ 503: 'SERVICE UNAVAILABLE',
+ 504: 'GATEWAY TIMEOUT',
+ 505: 'HTTP VERSION NOT SUPPORTED',
}
class WSGIRequest(httpwrappers.HttpRequest):