[New-bugs-announce] [issue36522] http/client.py does not print duplicate header values in debug
Matt Houglum
report at bugs.python.org
Wed Apr 3 22:45:33 EDT 2019
New submission from Matt Houglum <houglum at google.com>:
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.
----------
components: Library (Lib)
messages: 339424
nosy: Matt Houglum
priority: normal
severity: normal
status: open
title: http/client.py does not print duplicate header values in debug
versions: Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36522>
_______________________________________
More information about the New-bugs-announce
mailing list