Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, mdehoon, pitrou
Date 2012-12-19.09:55:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hum, io objects are not supposed to close themselves when they run out of data.
Even if HTTPResponse chooses to close the underlying socket (to clean unused resources?), it should not report itself as a closed io.IOBase.
Subsequent calls read() should return b"", this is the io.RawIOBase way to indicate EOF.

To fix this particular example, it seems enough to delete the "@property def closed(self)" from HTTPResponse. Note the XXX just above:
    # XXX This class should probably be revised to act more like
    # the "raw stream" that BufferedReader expects.
But close() should be modified as well, and internal calls to close() should be changed to only close the underlying socket.
Date User Action Args
2012-12-19 09:55:14amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, mdehoon, pitrou
2012-12-19 09:55:14amaury.forgeotdarcsetmessageid: <>
2012-12-19 09:55:14amaury.forgeotdarclinkissue16723 messages
2012-12-19 09:55:13amaury.forgeotdarccreate