mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #13128: Print response headers for CONNECT requests when debuglevel > 0.
Patch by Demian Brecht.
This commit is contained in:
parent
50457403f2
commit
ab53ab0a84
3 changed files with 24 additions and 5 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue