inconsistent behavior for duplicate key headers #1810
Unanswered
iscai-msft
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've noticed different behavior for request headers with duplicate keys between calling
client.send
andhttpx.get
.Say you have headers

[("Hello": "foo"), ("Hello": "bar")]
. Sending this by first creating aRequest
object and passing it toclient.send
passes"Hello": "foo, bar"
However, if I pass in these headers through

httpx.get
, only"Hello: bar"
ends up passed to the serviceI think this behavior should be consistent across these 2 different methods of sending requests, and it should combine the two different values into a comma separated string, since this way no information is being lost, and it's consistent with the response.headers behavior
Beta Was this translation helpful? Give feedback.
All reactions