summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/core/handlers/wsgi.py4
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