[issue11652] urlib2 returns a pair of integers as the content-length value

Billy Saelim report at bugs.python.org
Wed Mar 23 17:43:47 CET 2011


New submission from Billy Saelim <saelim at gmail.com>:

urlopen does not always return a single value for 'content-length'.  For example:


>>> import urllib2
>>> request = 'http://wwwsearch.sourceforge.net/mechanize/src/mechanize-0.1.11.zip'
>>> fp = urllib2.urlopen(request)
>>> fp.info().dict
{'content-length': '289519, 289519', 'x-varnish': '929586024', 'via': '1.1 varnish', 'age': '0', 'expires': 'Fri, 25 Mar 2011 14:36:43 GMT', 'server': 'Apache/2.2.3 (CentOS)', 'last-modified': 'Sat, 07 Feb 2009 19:15:15 GMT', 'connection': 'close', 'etag': '"46aef-46258f510b6c0"', 'date': 'Wed, 23 Mar 2011 14:36:43 GMT', 'content-type': 'application/zip'}

----------
components: Library (Lib)
messages: 131894
nosy: Billy.Saelim
priority: normal
severity: normal
status: open
title: urlib2 returns a pair of integers as the content-length value
type: behavior
versions: Python 2.6

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


More information about the Python-bugs-list mailing list