-
Notifications
You must be signed in to change notification settings - Fork 843
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
Remove connection-specific headeres for HTTP/2 and HTTP/3 #659
Remove connection-specific headeres for HTTP/2 and HTTP/3 #659
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This handles h2 response protocol correctness but there are more scenarios to consider. https://tools.ietf.org/html/rfc7230#section-6.1 says we should remove the Connection header from all requests and responses, and all headers referenced by that (e.g. forwarding Connection: close
would be bad for proxy scenarios). However, removing Connection: Upgrade
would break WebSockets.
We also need to test what happens for requests. Does HttpClient filter out these headers on h2/3? |
This PR should also cover the request version of the #583 scenario. Do some reading about the Connection header and decide if you want to handle that at the same time or as a separate issue/PR. I'd forgotten we had a separate issue to track that already. |
On the request side, HttpClient drops these headers: |
That's good. HttpClient doesn't skip the Keep-Alive header? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Keep-Alive question can be investigated separately.
Fixes #583
YARP workaround for dotnet/aspnetcore#24543 that was merged into 6.0 in Kestrel.