-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When multiple headers have the same key, only one is preserved #292
Comments
input.headers should return a list of tuples. If you want to use Does that work for you? |
I'll test. Currently the headers can be referenced like this: input.headers['header-name']. Are you saying that under the hood it's actually a list of tuples, and the dictionary reference method is just syntactic sugar? |
No, I mean the ask here is that you want headers back as a multidict instead of a list of tuples. I am saying, if you want multidict, then just pass the list of tuples into the multidict instead of expecting headers to come back as a multidict by default :) |
Ah - I was misunderstanding the structure. I thought the headers were already a dictionary. Calling mutlidict should work. I'll let you know if I hit any blockers. |
@mottersheadt this needs to be re-opened because |
Ok. Won't it be dangerous to switch it to a list of tuples at this point? Everyone who has currently implemented Larky scripts using the header dictionary will have their routes break. I think moving it to a multi-dictionary would be more backwards compatible. |
It depends which FCO, I think. |
Here is the current syntax for
|
Problem or feature statement
input.headers
does not support multi-dict. If there are 2 Set-Cookie headers in an HTTP response, the second one gets deleted.Advised solution
We should use the multi-dict feature in Larky to support having multiple headers with the same key.
The text was updated successfully, but these errors were encountered: