Add comment explaining try/except for endheaders().

This commit is contained in:
Jeremy Hylton 2003-05-05 01:47:13 +00:00
parent 828023b6b5
commit f6b444ede4
1 changed files with 2 additions and 0 deletions

View File

@ -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: