[issue4631] urlopen returns extra, spurious bytes

Daniel Diniz report at bugs.python.org
Sun Dec 14 13:17:18 CET 2008


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

Clarifying the diagnosis, the offending spurious bytes are only present
when we use 3.0's GET above.

That's because urllib.request.HTTPHandler asks for a vanilla
http.client.HTTPConnection, which uses HTTP 1.1.

IIUC, either we change the request version back to 1.0 (attached patch)
or correct the way the response is processed (is it at all?).

I think HTTPSHandler will also suffer from this, perhaps
[Fancy]URLopener too.

[Antoine: cool, an edit conflict that agrees with what I was about to
post :D]

----------
keywords: +patch
Added file: http://bugs.python.org/file12351/urllib_bytes.diff

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


More information about the Python-bugs-list mailing list