Open GoogleCodeExporter opened 8 years ago
[deleted comment]
[deleted comment]
version: 0.7.0
file: httplib2.__init__.py
line 1488~1490
if isinstance(info, httplib.HTTPResponse):
for key, value in info.getheaders():
self[key.lower()] = value
Why you do lower() for all header fields?
I think you should remove lower(), though RFC 2616 say 'Field names are
case-insensitive'.
http://tools.ietf.org/html/rfc2616#section-4.2
Original comment by shuge....@gmail.com
on 7 Oct 2011 at 11:27
The following should normalize header keys to Xxxx or Xxxx-Xxxx
__init__.py line 252:
NORMALIZE_SPACE = re.compile(r'(?:\r\n)?[ \t]+')
def _normalize_headers(headers):
normalize_key = lambda k: '-'.join([l.capitalize() for l in k.split('-')])
return dict([ (normalize_key(key), NORMALIZE_SPACE.sub(value, ' ').strip()) for (key, value) in headers.iteritems()])
Original comment by r...@perkville.com
on 12 Jan 2012 at 5:45
I also seems have issues: "-" are converting to "_". If it's a known issue with
a patch pleas?
Original comment by gkhachik...@gmail.com
on 2 Dec 2012 at 1:06
Original issue reported on code.google.com by
lukesnee...@gmail.com
on 25 Aug 2011 at 7:48