Add comment explaining try/except for endheaders().
This commit is contained in:
parent
828023b6b5
commit
f6b444ede4
|
@ -817,6 +817,8 @@ class AbstractHTTPHandler(BaseHandler):
|
||||||
h.putheader(*args)
|
h.putheader(*args)
|
||||||
for k, v in req.headers.items():
|
for k, v in req.headers.items():
|
||||||
h.putheader(k, v)
|
h.putheader(k, v)
|
||||||
|
# httplib will attempt to connect() here. be prepared
|
||||||
|
# to convert a socket error to a URLError.
|
||||||
try:
|
try:
|
||||||
h.endheaders()
|
h.endheaders()
|
||||||
except socket.error, err:
|
except socket.error, err:
|
||||||
|
|
Loading…
Reference in New Issue