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

2011-03-23 Thread Billy Saelim
New submission from Billy Saelim : 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

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

2011-03-23 Thread Santoso Wijaya
Santoso Wijaya added the comment: Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2 >>> request = >>> 'http://wwwsearch.sourceforge.net/mechanize/src/mechanize-0.1.11.zi

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

2011-03-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Interesting, the Content-Length header was sent twice: HTTP/1.1 200 OK Server: Apache/2.2.3 (CentOS) Last-Modified: Sat, 07 Feb 2009 19:15:15 GMT ETag: "46aef-46258f510b6c0" Content-Length: 289519 Expires: Fri, 25 Mar 2011 17:32:49 GMT Content-Type: applicat