commit | 962e9165aac50703f84f4ea6fd23d81a12fdebeb | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Sun Jan 21 10:35:14 2007 +0000 |
committer | Georg Brandl <georg@python.org> | Sun Jan 21 10:35:14 2007 +0000 |
tree | c64b32e0831f0b6999711fb4b73543cc741e7d16 | |
parent | 8e932e7d6886544a1b0f2503382d87e3875eb9fe [diff] [blame] |
Patch #1627441: close sockets properly in urllib2. (backport from rev. 53511)
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 @@ # 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