[devtools] make return value of get_response_header(raw=True) consistent wrt get_header(raw=True) stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Mon, 18 Apr 2011 08:03:46 +0200
branchstable
changeset 7232 506a0af77cee
parent 7230 edd2a575a8e7
child 7235 5a0ee8de7f06
child 7239 078cfa8a5187
[devtools] make return value of get_response_header(raw=True) consistent wrt get_header(raw=True) i.e. get_response_header(raw=True) now returns the first element of the list rather than the list itself.
devtools/fake.py
--- a/devtools/fake.py	Fri Apr 15 11:58:33 2011 +0200
+++ b/devtools/fake.py	Mon Apr 18 08:03:46 2011 +0200
@@ -112,7 +112,7 @@
         raise KeyError if the header is not set
         """
         if raw:
-            return self.headers_out.getRawHeaders(header, default)
+            return self.headers_out.getRawHeaders(header, default)[0]
         else:
             return self.headers_out.getHeader(header, default)