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 <rep...@bugs.python.org>
<http://bugs.python.org/issue3566>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to