Author eranrund
Recipients asvetlov, eranrund, orsenthil, piotr.dobrogost, pitrou
Date 2012-11-07.01:20:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

I have attached a patch that includes a (slightly broken) fix and a test case. Note that there is currently an unresolved issue:
If the user reads the exact amount of bytes the server sent, read() on the socket will never have a chance to return '' and inform the user about the connection termination. This will also happen if the user reads more data than the server is sending. In that case, again, read() will not get called again so we will never know the socket is gone. One possible way to address this is perform the actual read() calls in a loop, attempting to read the exact amount the user specified. If we do this and the user attempts to read more bytes than the server sent, we will properly detect it. If, however, the user reads the exact length, then we still have a problem.

I am not sure what would be the correct way of solving this.
Date User Action Args
2012-11-07 01:20:23eranrundsetrecipients: + eranrund, orsenthil, pitrou, asvetlov, piotr.dobrogost
2012-11-07 01:20:23eranrundsetmessageid: <>
2012-11-07 01:20:21eranrundlinkissue16298 messages
2012-11-07 01:20:14eranrundcreate