[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

Demian Brecht report at bugs.python.org
Tue Jan 20 19:10:21 CET 2015


Demian Brecht added the comment:

Now I think I'd like to take my foot out of my mouth.

Previous quick experiments that I had done were at the socket level, circumventing some of the logic in the HTTPResponse, mainly the calls to readline() rather than simple socket.recv(<N>).

I've confirmed that the /only/ way that the HTTPConnection object can possibly get a 0-length read is, in fact, if the remote host has closed the connection.

In light of that, I have no objection at all to the suggested addition of ConnectionClosed exception and my apologies for the added confusion and dragging this issue on much longer than it should have been.

I've also attached my proof of concept code for posterity.

----------
Added file: http://bugs.python.org/file37793/zero_response_poc.py

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


More information about the Python-bugs-list mailing list