summaryrefslogtreecommitdiff
path: root/Lib/urllib2.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-01-21 10:35:14 +0000
committerGeorg Brandl <georg@python.org>2007-01-21 10:35:14 +0000
commit402a80450b1b654dc269de9b6bbd3f9f244b38c3 (patch)
tree17e70d2e8b03ca489898dc5a553f7768c38a2013 /Lib/urllib2.py
parenteb5337f42032057f767e485773671acd8bffaa2e (diff)
downloadcpython-402a80450b1b654dc269de9b6bbd3f9f244b38c3.tar.gz
Patch #1627441: close sockets properly in urllib2.
(backport from rev. 53511)
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 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