[Python-checkins] cpython (2.7): Issue #8035: urllib: Fix a bug where the client could remain stuck after a
charles-francois.natali
python-checkins at python.org
Sun Dec 18 16:09:40 CET 2011
http://hg.python.org/cpython/rev/038616802b65
changeset: 74033:038616802b65
branch: 2.7
parent: 74030:2863470caebb
user: Charles-François Natali <neologix at free.fr>
date: Sun Dec 18 15:52:48 2011 +0100
summary:
Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
files:
Lib/urllib.py | 2 --
Misc/NEWS | 3 +++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Lib/urllib.py b/Lib/urllib.py
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -374,7 +374,6 @@
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 IOError, ('http error', errcode, errmsg, headers)
@@ -640,7 +639,6 @@
newurl = headers['uri']
else:
return
- void = fp.read()
fp.close()
# In case the server sent a relative URL, join with original:
newurl = basejoin(self.type + ":" + url, newurl)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -86,6 +86,9 @@
Library
-------
+- Issue #8035: urllib: Fix a bug where the client could remain stuck after a
+ redirection or an error.
+
- Issue #4625: If IDLE cannot write to its recent file or breakpoint
files, display a message popup and continue rather than crash.
(original patch by Roger Serwy)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list