Skip to content
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

multiple request headers with same name aren't preserved #630

Open
eli-darkly opened this issue Jul 6, 2022 · 0 comments
Open

multiple request headers with same name aren't preserved #630

eli-darkly opened this issue Jul 6, 2022 · 0 comments

Comments

@eli-darkly
Copy link

This is similar to #629, but on the request side, and a bit worse because it actually loses information that the client has sent. In other words, if the client sends the following headers—

my-header: value1
my-header: value2

—then session.getHeaders().get("my-header") will return only "value2". But it is legal for a client to do this (as an alternative to sending comma-delimited values), so it should be possible for the server to see what was sent.

I don't see any workaround for this in the current implementation (I mean, except to make sure the client will always send comma-delimited values instead of multiple lines, but when you're writing server code you can't necessarily control what the client will do). And I don't think I have ever seen an HTTP server framework that simply ignores multiple header lines like this; generally they provide a method for getting a list of values for any given header name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant