diff options
author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-29 10:20:10 +0000 |
---|---|---|
committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-29 10:20:10 +0000 |
commit | fa1a0532d35ee5ff342c19821ad290ad48771aa4 (patch) | |
tree | d161964e650b7c632b9071c7b3b8d233f67a62dc | |
parent | d879bce16648ce7a4ae4df8f36a9c2c5cf5b7f81 (diff) | |
download | django-fa1a0532d35ee5ff342c19821ad290ad48771aa4.tar.gz |
unicode: Changed header construction for WSGI servers so that we only send
string types (not unicode that is coercable to ASII). Fixes a PEP 333 violation.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r-- | django/core/handlers/wsgi.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 04c39834d1..49938e25dc 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -200,8 +200,8 @@ class WSGIHandler(BaseHandler): except KeyError: status_text = 'UNKNOWN STATUS CODE' status = '%s %s' % (response.status_code, status_text) - response_headers = response.headers.items() + response_headers = [(str(k), str(v)) for k, v in response.headers.items()] for c in response.cookies.values(): - response_headers.append(('Set-Cookie', c.output(header=''))) + response_headers.append(('Set-Cookie', str(c.output(header='')))) start_response(status, response_headers) return response |