Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
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 @@
 
     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 @@
             newurl = headers['uri']
         else:
             return
-        void = fp.read()
         fp.close()
 
         # In case the server sent a relative URL, join with original:
diff --git a/Misc/NEWS b/Misc/NEWS
index 286192c..85667cc 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -419,6 +419,9 @@
 Library
 -------
 
+- Issue #8035: urllib: Fix a bug where the client could remain stuck after a
+  redirection or an error.
+
 - Issue #13560: os.strerror() now uses the current locale encoding instead of
   UTF-8.