bpo-33365: print the header values beside the keys (GH-6611)
with debuglevel=1 only the header keys got printed. With
this change the header values get printed as well and the single
header entries get '\n' as a separator.
(cherry picked from commit 936f03e7fafc28fd6fdfba11d162c776b89c0167)
Co-authored-by: Marco Strigl <mstrigl@suse.com>
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 1292db7..5aa178d 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -321,7 +321,7 @@
if self.debuglevel > 0:
for hdr in self.headers:
- print("header:", hdr, end=" ")
+ print("header:", hdr + ":", self.headers.get(hdr))
# are we using the chunked-style of transfer encoding?
tr_enc = self.headers.get("transfer-encoding")