diff options
author | Charles-François Natali <neologix@free.fr> | 2011-12-18 15:52:48 +0100 |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2011-12-18 15:52:48 +0100 |
commit | f3d35f0efe4bd669782e29a9ccf21570878ed319 (patch) | |
tree | de5f555aadf065a1ec0fe352e3f202e81718d54e /Lib/urllib.py | |
parent | cc1a0865f1320342b975ba72e48afc61164208f8 (diff) | |
download | cpython-git-f3d35f0efe4bd669782e29a9ccf21570878ed319.tar.gz |
Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index 0432cccea6..7b0a81cade 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -374,7 +374,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 IOError, ('http error', errcode, errmsg, headers) @@ -640,7 +639,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: newurl = basejoin(self.type + ":" + url, newurl) |