summaryrefslogtreecommitdiffstats
path: root/Lib/urllib2.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-01-21 10:35:10 (GMT)
committerGeorg Brandl <georg@python.org>2007-01-21 10:35:10 (GMT)
commitdd7b0525e902ee12a612611ea082e12f5999c823 (patch)
treeea6fda1769b0311d8f166d05d32d112afaa82c25 /Lib/urllib2.py
parentb84c13792db49abdfac97663badfeda0bba11279 (diff)
downloadcpython-dd7b0525e902ee12a612611ea082e12f5999c823.zip
cpython-dd7b0525e902ee12a612611ea082e12f5999c823.tar.gz
cpython-dd7b0525e902ee12a612611ea082e12f5999c823.tar.bz2
Patch #1627441: close sockets properly in urllib2.
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r--Lib/urllib2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 890d3d4..1ab5c61 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