easy_install doesn't work when there are multiple Content-Length headers
Hi all, 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? Hoàng Xuân Phú
On Mon, Mar 28, 2011 at 11:08 AM, Hoang Xuan Phu
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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03/28/2011 11:08 AM, Hoang Xuan Phu wrote:
Hi all,
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?
I reported this SF bug: http://sourceforge.net/apps/trac/sourceforge/ticket/18486 PJE has checked in my patch working around this bug. See issue 123: http://bugs.python.org/setuptools/issue123 Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2QvEMACgkQ+gerLs4ltQ6M8ACdEjNaxg1w3M2jCc0JuqfAJeLa SG8AoLOfZdbIpvDwrgvidOk4g72i61zU =ZoDQ -----END PGP SIGNATURE-----
participants (3)
-
Fred Drake
-
Hoang Xuan Phu
-
Tres Seaver