merge from 3.5

Issue #26892: Honor debuglevel flag in urllib.request.HTTPHandler.

Patch contributed by Chi Hsuan Yen.
This commit is contained in:
Senthil Kumaran 2016-05-13 01:35:29 -07:00
commit 5d1110a952
3 changed files with 13 additions and 2 deletions

View file

@ -1271,6 +1271,7 @@ class AbstractHTTPHandler(BaseHandler):
# will parse host:port
h = http_class(host, timeout=req.timeout, **http_conn_args)
h.set_debuglevel(self._debuglevel)
headers = dict(req.unredirected_hdrs)
headers.update(dict((k, v) for k, v in req.headers.items()