[issue4631] urlopen returns extra, spurious bytes

Daniel Diniz report at bugs.python.org
Tue Dec 16 00:00:13 CET 2008


Daniel Diniz <ajaksu at gmail.com> added the comment:

I think your patch is good, but there may be another bug around:

I wrote a script to check results of 3.x against 2.x, but many pages
(http://groups.google.com/, http://en.wikipedia.org/) give 403:
Forbidden for 3.x... but work with 2.x!

If you think of this as a bug in 3.x, it could retry the request
identifying as 2.x on 403.

Other than that, your patch gives me identical results to 2.5/2.6 for
128 sites I tested (only a read(100) for each).

Interestingly, my patched version gives a file closer to the buggy
version in size, at 12700 bytes versus 12707. Your version agrees with
2.x and simple maths (128 x 100) in giving a 12799 bytes result. I have
no idea why.

HTH,
Daniel

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4631>
_______________________________________


More information about the Python-bugs-list mailing list