diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-07-26 12:12:56 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-07-26 12:12:56 (GMT) |
commit | 9298eff5f9a9a0b7e80523a97723693482ed0392 (patch) | |
tree | cf19b69595c86717c07fe99e53dee8e990fb9c89 /Lib/httplib.py | |
parent | 5f135787ec4040bfbeb16f2944086028635151db (diff) | |
download | cpython-9298eff5f9a9a0b7e80523a97723693482ed0392.zip cpython-9298eff5f9a9a0b7e80523a97723693482ed0392.tar.gz cpython-9298eff5f9a9a0b7e80523a97723693482ed0392.tar.bz2 |
Bug #978833: Really close underlying socket in _socketobject.close.
Fix httplib.HTTPConnection.getresponse to not close the
socket if it is still needed for the response.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 36381de..95456ea 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -926,8 +926,8 @@ class HTTPConnection: self.__state = _CS_IDLE if response.will_close: - # this effectively passes the connection to the response - self.close() + # Pass the socket to the response + self.sock = None else: # remember this, so we can tell when it is complete self.__response = response |