Skip to content

Commit

Permalink
[soc2009/http-wsgi-improvements] Fixes for HttpResponse.charsets docs…
Browse files Browse the repository at this point in the history
… 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
ccahoon committed Jul 31, 2009
1 parent 019d20a commit edcc1c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 1 addition & 7 deletions django/http/__init__.py
Expand Up @@ -278,7 +278,7 @@ def __init__(self, content='', mimetype=None, status=None,
content_type=None, request=None): content_type=None, request=None):
from django.conf import settings from django.conf import settings
accept_charset = None accept_charset = None
_charset = settings.DEFAULT_CHARSET self._charset = settings.DEFAULT_CHARSET
if mimetype: if mimetype:
content_type = mimetype # Mimetype arg is an alias for content-type content_type = mimetype # Mimetype arg is an alias for content-type
if request: if request:
Expand Down Expand Up @@ -503,12 +503,6 @@ def __init__(self, permitted_methods):
HttpResponse.__init__(self) HttpResponse.__init__(self)
self['Allow'] = ', '.join(permitted_methods) 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): class HttpResponseGone(HttpResponse):
_status_code = 410 _status_code = 410


Expand Down
3 changes: 1 addition & 2 deletions django/http/charsets.py
Expand Up @@ -240,7 +240,7 @@ def get_codec(charset):
http://www.iana.org/assignments/character-sets contains valid aliases. http://www.iana.org/assignments/character-sets contains valid aliases.
The documentation for the codecs module has the list of codecs. 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 codec = None
if charset: if charset:
Expand Down Expand Up @@ -324,7 +324,6 @@ def get_response_encoding(content_type, accept_charset_header):
# code in the HttpResponse. # code in the HttpResponse.
return charset, codec return charset, codec


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

0 comments on commit edcc1c2

Please sign in to comment.