-
Notifications
You must be signed in to change notification settings - Fork 185
Merge Vary header #543
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
Comments
I think this is an issue in hyper, rather than a tower specific issue. Note it's not invalid according to the HTTP spec in this case. We can probably achieve this with a Tower layer. Here's what I'm now using in my side project having stumbled upon this issue: https://gist.github.com/samgiles/eacdbc35dc5ff1d2ec4ce8d2aef54f67 <- would be happy to see this contributed if it's useful . |
This is definitely not related to hyper. Where did you find that this is not valid? I'm pretty sure MDN said it is valid when I wrote this code. |
@jplatte I said:
I think you misread 😅
In my testing last night it was the serialization of the HeaderMap onto the wire that caused this duplicate. See the link to hyper (I’m using hyper and I’ve guessed OP is too). This crate isn’t handling the protocol itself right? |
This crate is adding the header to an |
Ah right, I have a failing test in a branch, perhaps if you can point me to where this is happening I can propose a fix in a PR, I couldn't find this before |
Well first, why "fix" what's not broken? |
It’s not ideal behaviour according to the spec. RFC7230 is perhaps a little ambiguous. RFC 7230, Section 3.2.2, Field Order
But then goes on to say:
I interpret this as - please don’t send messages like this but clients can handle it if they want to, but they don’t need to. So I see fixing this as helping to conform closer to the spec. |
I don't interpret it the same way. A recipient being allowed to coalesce multiple The main reason I am hesitant about this is that the |
Is this okay Vary header don't merge with Vary header from response (other layers)? each layer should add Vary header?
Here layers
Here resposne
The text was updated successfully, but these errors were encountered: