summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/news.txt3
-rw-r--r--paste/wsgiwrappers.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/docs/news.txt b/docs/news.txt
index ff9571a..6a2e40b 100644
--- a/docs/news.txt
+++ b/docs/news.txt
@@ -6,6 +6,9 @@ News
0.9.8
-----
+* Fixed ``wsgiwrappers.WSGIResponse`` mishandling multiple headers of
+ the same name
+
* Added a Paste Deploy entry point for ``paste.auth.cookie``
* Moved Paste Deploy dependencies out of top-level modules and into
diff --git a/paste/wsgiwrappers.py b/paste/wsgiwrappers.py
index 7eddc68..334e80a 100644
--- a/paste/wsgiwrappers.py
+++ b/paste/wsgiwrappers.py
@@ -134,7 +134,7 @@ class WSGIResponse(object):
def __str__(self):
"Full HTTP message, including headers"
return '\n'.join(['%s: %s' % (key, value)
- for key, value in self.headers.items()]) \
+ for key, value in self.headers.headeritems()]) \
+ '\n\n' + ''.join(self.content)
def has_header(self, header):
@@ -172,7 +172,7 @@ class WSGIResponse(object):
encoding = settings['charset']
status_text = STATUS_CODE_TEXT[self.status_code]
status = '%s %s' % (self.status_code, status_text)
- response_headers = self.headers.items()
+ response_headers = self.headers.headeritems()
for c in self.cookies.values():
response_headers.append(('Set-Cookie', c.output(header='')))
output = self.get_content_as_string(encoding)