summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/urllib2.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 75583e3..3e700a9 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -817,6 +817,8 @@ class AbstractHTTPHandler(BaseHandler):
h.putheader(*args)
for k, v in req.headers.items():
h.putheader(k, v)
+ # httplib will attempt to connect() here. be prepared
+ # to convert a socket error to a URLError.
try:
h.endheaders()
except socket.error, err: