diff options
author | Georg Brandl <georg@python.org> | 2007-01-21 10:35:10 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-01-21 10:35:10 +0000 |
commit | dd7b0525e902ee12a612611ea082e12f5999c823 (patch) | |
tree | ea6fda1769b0311d8f166d05d32d112afaa82c25 /Lib/urllib2.py | |
parent | b84c13792db49abdfac97663badfeda0bba11279 (diff) | |
download | cpython-git-dd7b0525e902ee12a612611ea082e12f5999c823.tar.gz |
Patch #1627441: close sockets properly in urllib2.
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r-- | Lib/urllib2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 890d3d4a6c..1ab5c61454 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -1087,7 +1087,7 @@ class AbstractHTTPHandler(BaseHandler): # out of socket._fileobject() and into a base class. r.recv = r.read - fp = socket._fileobject(r) + fp = socket._fileobject(r, close=True) resp = addinfourl(fp, r.msg, req.get_full_url()) resp.code = r.status |