Issue123

If you're reporting an issue for setuptools 0.7 or higher, please use BitBucket

Title [PATCH] Tolerate responses with multiple Content-Length headers
Priority urgent Status resolved
Superseder Nosy List pje, tseaver
Assigned To pje Keywords

Created on 2011-03-23.14:12:52 by tseaver, last changed 2011-03-23.20:41:30 by pje.

Files
File name Uploaded Type Edit Remove
setuptools-multi_content_length.patch tseaver, 2011-03-23.14:12:51 text/x-diff
Messages
msg599 (view) Author: pje Date: 2011-03-23.20:41:30
Implemented: download snapshots/setuptools-0.6c12dev-r88793.tar.gz to test.  Thanks for the report!
msg598 (view) Author: tseaver Date: 2011-03-23.14:12:51
Some servers (e.g., wwwsearch.sourceforge.net) apparently send multiple
'Content-Length' headers, which causes setuptools to barf trying to convert
a '<length>, <length>' string to an integer.

This bug breaks installing 'mechanize', which lists wwwsearch.sourceforge.net
as its Download-URL, and therefore causes a bunch of Zope-related tests to fail
(e.g., https://mail.zope.org/pipermail/cmf-tests/2011-March/014576.html ).

The attached patch uses 'headers.getheaders('Content-Length')[0] to use only
the first value found.
History
Date User Action Args
2011-03-23 20:41:30pjesetstatus: unread -> resolved
messages: + msg599
2011-03-23 14:12:52tseavercreate