[Distutils] easy_install doesn't work when there are multiple Content-Length headers

Fred Drake fdrake at acm.org
Mon Mar 28 18:29:31 CEST 2011


On Mon, Mar 28, 2011 at 11:08 AM, Hoang Xuan Phu <phunehehe at gmail.com> wrote:
> Just today I'm using easy_install to install mechanize and it is failing
> with the error "ValueError: invalid literal for int() with base 10: '382727,
> 382727'". By reading the source code and looking at the headers I see that
> the server is returning 2 Content-Length headers (same value, 382727), which
> is turned into '382727, 382727'. Fixing this should be very easy and I can
> do it then submit a patch. I'm just wondering, as distutils seem to be in a
> forking process, what's the best way to solve this?

This is a problem with httplib, which should be resilient to this
situation.  I've already filed a bug against SourceForge, for
generating an extra (useless) header, but it's only vaguely a bug.


  -Fred

--
Fred L. Drake, Jr.    <fdrake at acm.org>
"A storm broke loose in my mind."  --Albert Einstein


More information about the Distutils-SIG mailing list