summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Cahoon <chris.cahoon@gmail.com>2009-07-31 01:19:12 +0000
committerChris Cahoon <chris.cahoon@gmail.com>2009-07-31 01:19:12 +0000
commitedcc1c2e7e3adabe317495db9d90333df6166c8e (patch)
tree5640dd790b77db60e122c65ea3e34d7e8d2d64e4
parent019d20a465996f2461deac444169b99f8c20e16f (diff)
downloaddjango-edcc1c2e7e3adabe317495db9d90333df6166c8e.tar.gz
[soc2009/http-wsgi-improvements] Fixes for HttpResponse.charsets docs and HttpResponse._charset. Refs #10190.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/http/__init__.py8
-rw-r--r--django/http/charsets.py3
2 files changed, 2 insertions, 9 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index 7f96e8309b..656c0d91a5 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -278,7 +278,7 @@ class HttpResponse(object):
content_type=None, request=None):
from django.conf import settings
accept_charset = None
- _charset = settings.DEFAULT_CHARSET
+ self._charset = settings.DEFAULT_CHARSET
if mimetype:
content_type = mimetype # Mimetype arg is an alias for content-type
if request:
@@ -503,12 +503,6 @@ class HttpResponseNotAllowed(HttpResponse):
HttpResponse.__init__(self)
self['Allow'] = ', '.join(permitted_methods)
-class HttpResponseNotAcceptable(HttpResponse):
- _status_code = 406
-
- # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
- # if we want to make this more verbose (compliant, actually)
-
class HttpResponseGone(HttpResponse):
_status_code = 410
diff --git a/django/http/charsets.py b/django/http/charsets.py
index 605f200ba7..b91bed8aeb 100644
--- a/django/http/charsets.py
+++ b/django/http/charsets.py
@@ -240,7 +240,7 @@ def get_codec(charset):
http://www.iana.org/assignments/character-sets contains valid aliases.
The documentation for the codecs module has the list of codecs.
- CODEC_CHARSETS above has the codecs that correspond to character sets.
+ _CHARSET_CODECS above has the codecs that correspond to character sets.
"""
codec = None
if charset:
@@ -324,7 +324,6 @@ def get_response_encoding(content_type, accept_charset_header):
# code in the HttpResponse.
return charset, codec
-# NOTE -- make sure we are not duping the processing of q values
def _process_accept_charset(accept_charset):
'''
HTTP RFC 2616 section 14.2 dictates that q must be between 0 and 1.