[issue12455] urllib2 Request() forces capitalize() on header names, breaking some requests
Cal Leeming
report at bugs.python.org
Thu Jun 30 22:19:39 CEST 2011
Cal Leeming <cal.leeming at simplicitymedialtd.co.uk> added the comment:
So @r.david.murray, it would appear you were right :D Really, I should have looped through each method on str(), and wrapped them all to see which were being called, but lesson learned I guess.
Sooo, I guess now the question is, can we possibly get a vote on having a feature which disables this functionality from the opener level. Something like:
opener = urllib2.build_opener(urllib2.HTTPHandler(debuglevel=1, keep_original_header_case=True))
But obviously a less tedious attribute name :)
In the mean times, if anyone else comes up against this problem, the code I pasted above will work fine for now.
Cal
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12455>
_______________________________________
More information about the Python-bugs-list
mailing list