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)
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)
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)