You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per specs, these should be treated as equivalent. But I believe we are only dealing with the latter right now. It might make sense to double check what the ASGI spec, the HTTP specs, the OpenAPI spec, requests/TesClient and finally Starlette have to say about the matter and then fix the issue (if there is one)
The text was updated successfully, but these errors were encountered:
adriangb
changed the title
but: repeated vs comma separated headers
bug: repeated vs comma separated headers
Jan 21, 2022
adriangb
changed the title
bug: repeated vs comma separated headers
bug: repeated vs comma separated array headers
Jan 21, 2022
So at least the tests won't be a total pain to write.
It also looks like Starlette supports repeated headers but does nothing about comma separated ones. This makes sense.
Given our need to support array headers, think the most flexible/logical thing to do is to merge any repeated headers (in order, as per the spec) with the first value. So [("x-header", "1,2"), ("x-header", "3")] becomes {"x-header": "1,2,3"}. The we'd parse just like we currently do.
As per specs, these should be treated as equivalent. But I believe we are only dealing with the latter right now. It might make sense to double check what the ASGI spec, the HTTP specs, the OpenAPI spec, requests/TesClient and finally Starlette have to say about the matter and then fix the issue (if there is one)
The text was updated successfully, but these errors were encountered: