[issue26231] HTTPResponse.close() should consume all remaining data in body if any

Jacky report at bugs.python.org
Thu Jan 28 08:19:55 EST 2016


Jacky added the comment:

In my opinion, HTTPResponse.close() should do really close work. Not only releasing the underlying file obj but also need to consume the remaining data to make sure the request complete.

If close() does not consume the remaining data, the user would have to do it after invoking close(), regardless of how large the data is. But how do do it, the HTTPResponse has been closed. So we have to use HTTPConnection.sock to do read work. However, this looks somewhat weird.

----------

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


More information about the Python-bugs-list mailing list