diff -r e405bcbf761c Lib/http/client.py --- a/Lib/http/client.py Mon Jul 21 19:20:06 2014 +0200 +++ b/Lib/http/client.py Mon Jul 21 16:31:08 2014 -0700 @@ -894,6 +894,9 @@ if line in (b'\r\n', b'\n', b''): break + if self.debuglevel >= 0: + print('header:', line) + def connect(self): """Connect to the host and port specified in __init__.""" self.sock = self._create_connection((self.host,self.port),