1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

Replaced some byte strings by str() calls

This is a useful trick when Python 2 awaits byte strings and
Python 3 Unicode (regular) strings.
This commit is contained in:
Claude Paroz
2012-08-03 15:18:13 +02:00
parent 2407c45c18
commit 9908201d7f
6 changed files with 15 additions and 15 deletions

View File

@@ -245,6 +245,6 @@ class WSGIHandler(base.BaseHandler):
status = '%s %s' % (response.status_code, status_text)
response_headers = [(str(k), str(v)) for k, v in response.items()]
for c in response.cookies.values():
response_headers.append((b'Set-Cookie', str(c.output(header=''))))
response_headers.append((str('Set-Cookie'), str(c.output(header=''))))
start_response(smart_str(status), response_headers)
return response