-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Send 431 when HTTP/2&3 headers are too large or many #44668
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
Conversation
src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs
Outdated
Show resolved
Hide resolved
Would it be possible to skip enforcing the header count limit while receiving, and only enforce the exact value afterwards? |
We'd rather not, that significantly reduces the effectiveness of the limit. |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/aspnetcore/actions/runs/3339111224 |
When HTTP/2 hits a header related limit (total size or count) it aborts the connection because HPACK is stateful and failing to process the rest of the headers in a request could corrupt the connection HPACK state. HTTP/3 copied this model.
To avoid this we'll allow up to 2x of the limits while processing the headers, but then enforce the hard limits later when we can send a 431.