1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

[soc2009/http-wsgi-improvements] http.HttpResponse now initializes self._codec to None.

Changeset 11030 did not actually pass the regression test suite. This passes all except two tests, from test_client_regress. They expect old behavior (which is that their responses will be encoded in settings.DEFAULT_CHARSET). I am not yet sure if that is the correct expectation for the test to have, so I will do investigations into that.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Chris Cahoon 2009-06-18 05:18:35 +00:00
parent a86d5ddc77
commit 7acae8f4d8

View File

@ -276,6 +276,7 @@ class HttpResponse(object):
content_type=None, request=None): content_type=None, request=None):
from django.conf import settings from django.conf import settings
self._charset = settings.DEFAULT_CHARSET self._charset = settings.DEFAULT_CHARSET
self._codec = None
accept_charset = None accept_charset = None
if mimetype: if mimetype:
content_type = mimetype # Mimetype is an alias for content-type content_type = mimetype # Mimetype is an alias for content-type