Skip to content
Browse files

[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
  • Loading branch information...
1 parent 019d20a commit edcc1c2e7e3adabe317495db9d90333df6166c8e @ccahoon ccahoon committed Jul 31, 2009
Showing with 2 additions and 9 deletions.
  1. +1 −7 django/http/__init__.py
  2. +1 −2 django/http/charsets.py
View
8 django/http/__init__.py
@@ -278,7 +278,7 @@ def __init__(self, content='', mimetype=None, status=None,
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 @@ def __init__(self, permitted_methods):
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
View
3 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.

0 comments on commit edcc1c2

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