mirror of
https://github.com/django/django.git
synced 2025-07-05 18:29:11 +00:00
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
This commit is contained in:
parent
d879bce166
commit
fa1a0532d3
@ -200,8 +200,8 @@ class WSGIHandler(BaseHandler):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
status_text = 'UNKNOWN STATUS CODE'
|
status_text = 'UNKNOWN STATUS CODE'
|
||||||
status = '%s %s' % (response.status_code, status_text)
|
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():
|
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)
|
start_response(status, response_headers)
|
||||||
return response
|
return response
|
||||||
|
Loading…
x
Reference in New Issue
Block a user