Skip to content

Commit edcc1c2

Browse files
committed
[soc2009/http-wsgi-improvements] Fixes for HttpResponse.charsets docs and HttpResponse._charset. Refs django#10190.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 019d20a commit edcc1c2

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

django/http/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def __init__(self, content='', mimetype=None, status=None,
278278
content_type=None, request=None):
279279
from django.conf import settings
280280
accept_charset = None
281-
_charset = settings.DEFAULT_CHARSET
281+
self._charset = settings.DEFAULT_CHARSET
282282
if mimetype:
283283
content_type = mimetype # Mimetype arg is an alias for content-type
284284
if request:
@@ -503,12 +503,6 @@ def __init__(self, permitted_methods):
503503
HttpResponse.__init__(self)
504504
self['Allow'] = ', '.join(permitted_methods)
505505

506-
class HttpResponseNotAcceptable(HttpResponse):
507-
_status_code = 406
508-
509-
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
510-
# if we want to make this more verbose (compliant, actually)
511-
512506
class HttpResponseGone(HttpResponse):
513507
_status_code = 410
514508

django/http/charsets.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def get_codec(charset):
240240
http://www.iana.org/assignments/character-sets contains valid aliases.
241241
The documentation for the codecs module has the list of codecs.
242242
243-
CODEC_CHARSETS above has the codecs that correspond to character sets.
243+
_CHARSET_CODECS above has the codecs that correspond to character sets.
244244
"""
245245
codec = None
246246
if charset:
@@ -324,7 +324,6 @@ def get_response_encoding(content_type, accept_charset_header):
324324
# code in the HttpResponse.
325325
return charset, codec
326326

327-
# NOTE -- make sure we are not duping the processing of q values
328327
def _process_accept_charset(accept_charset):
329328
'''
330329
HTTP RFC 2616 section 14.2 dictates that q must be between 0 and 1.

0 commit comments

Comments
 (0)