This is a follow-up to https://bugs.python.org/issue33365. The fix for that issue (see https://github.com/python/cpython/pull/6611) added a statement to also print header values, but it does not account for the case where multiple values exist for the same header name, e.g. if my response contained these headers:
x-goog-hash: crc32c=KAwGng==
x-goog-hash: md5=eB5eJF1ptWaXm4bijSPyxw==
then the debug output would print whichever of those values is returned from `self.headers.get("x-goog-hash")` for both prints:
header: x-goog-hash: crc32c=KAwGng==
header: x-goog-hash: crc32c=KAwGng==
The iteration should instead be done using self.headers.items(), which will return the key and value pair to be printed. I'll send a GitHub PR shortly. |