diff options
author | Georg Brandl <georg@python.org> | 2007-01-21 10:35:14 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-01-21 10:35:14 +0000 |
commit | 402a80450b1b654dc269de9b6bbd3f9f244b38c3 (patch) | |
tree | 17e70d2e8b03ca489898dc5a553f7768c38a2013 /Lib/urllib2.py | |
parent | eb5337f42032057f767e485773671acd8bffaa2e (diff) | |
download | cpython-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.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 |