Issue #13128: Print response headers for CONNECT requests when debuglevel > 0.

Patch by Demian Brecht.
This commit is contained in:
Berker Peksag 2015-02-03 12:22:11 +02:00
parent 50457403f2
commit ab53ab0a84
3 changed files with 24 additions and 5 deletions

View file

@ -776,6 +776,9 @@ class HTTPConnection:
if line in (b'\r\n', b'\n', b''):
break
if self.debuglevel > 0:
print('header:', line.decode())
def connect(self):
"""Connect to the host and port specified in __init__."""
self.sock = self._create_connection(