[Distutils] [issue123] [PATCH] Tolerate responses with multiple Content-Length headers

Tres Seaver setuptools at bugs.python.org
Wed Mar 23 15:12:52 CET 2011


New submission from Tres Seaver <tseaver at palladion.com>:

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.

----------
assignedto: pje
files: setuptools-multi_content_length.patch
messages: 598
nosy: pje, tseaver
priority: urgent
status: unread
title: [PATCH] Tolerate responses with multiple Content-Length headers
Added file: http://bugs.python.org/setuptools/file75/setuptools-multi_content_length.patch

_______________________________________________
Setuptools tracker <setuptools at bugs.python.org>
<http://bugs.python.org/setuptools/issue123>
_______________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setuptools-multi_content_length.patch
Type: text/x-diff
Size: 669 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20110323/2ace421e/attachment.patch>


More information about the Distutils-SIG mailing list