summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-12-18 15:08:33 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-12-18 15:08:33 (GMT)
commit3c4dcea71267ac7c418a55454d85a4703116c774 (patch)
tree698eb3e7e2be0e37ee20d6a7f2a59f4325dc6535 /Lib/urllib
parent6099a032028e7d93d40741f1cda792407a635dc7 (diff)
parentcf53ae2171d01eed0e1c902b51da27b5bdfbc143 (diff)
downloadcpython-3c4dcea71267ac7c418a55454d85a4703116c774.zip
cpython-3c4dcea71267ac7c418a55454d85a4703116c774.tar.gz
cpython-3c4dcea71267ac7c418a55454d85a4703116c774.tar.bz2
Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/request.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 3a472f2..8bf15d8 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -1762,7 +1762,6 @@ class URLopener:
def http_error_default(self, url, fp, errcode, errmsg, headers):
"""Default error handler: close the connection and raise IOError."""
- void = fp.read()
fp.close()
raise HTTPError(url, errcode, errmsg, headers, None)
@@ -1951,7 +1950,6 @@ class FancyURLopener(URLopener):
newurl = headers['uri']
else:
return
- void = fp.read()
fp.close()
# In case the server sent a relative URL, join with original: