Commit a43ff865 authored by Tres Seaver's avatar Tres Seaver

Yuck -- who gets the blame for that?

parent a0991e28
...@@ -901,13 +901,7 @@ class HTTPResponse(BaseResponse): ...@@ -901,13 +901,7 @@ class HTTPResponse(BaseResponse):
for key, val in headers.items(): for key, val in headers.items():
if key.lower() == key: if key.lower() == key:
# only change non-literal header names # only change non-literal header names
key = "%s%s" % (key[:1].upper(), key[1:]) key = '-'.join([x.capitalize() for x in key.split('-')])
start = 0
l = key.find('-',start)
while l >= start:
key = "%s-%s%s" % (key[:l],key[l+1:l+2].upper(),key[l+2:])
start = l + 1
l = key.find('-', start)
append("%s: %s" % (key, val)) append("%s: %s" % (key, val))
if self.cookies: if self.cookies:
headersl = headersl+self._cookie_list() headersl = headersl+self._cookie_list()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment