[issue11652] urlib{, 2} returns a pair of integers as the content-length value

Senthil Kumaran report at bugs.python.org
Wed Mar 23 23:58:51 CET 2011


Senthil Kumaran <orsenthil at gmail.com> added the comment:

Yes, interesting that Content-Length is returned as a comma separated value of ints. 
Normally, this behavior is observed for other headers which can have multiple values and urllib appends the subsequent values of the header for e.g. Content-Type header.

curl seems to have got it right in this case, where it returns only one Content-Length header for the above URL. urllib needs to modify to deal with this scenario - If there are multiple content-lengths returned by the server, just use the last one if we are mimic curl behavior. (AFAIK, the standard is to return them comma separated, but in this case, it wont be useful).

----------
assignee:  -> orsenthil
nosy: +orsenthil

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11652>
_______________________________________


More information about the Python-bugs-list mailing list