mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Add comment explaining try/except for endheaders().
This commit is contained in:
parent
828023b6b5
commit
f6b444ede4
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue