diff -r 1ceb91974dc4 Lib/urllib/request.py --- a/Lib/urllib/request.py Sat Apr 30 01:30:57 2016 +0000 +++ b/Lib/urllib/request.py Sat Apr 30 17:54:10 2016 +0800 @@ -1271,6 +1271,7 @@ # 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()