-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Reject CR/LF's in Kestrel header decoding #34441
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/Core/src/Internal/Infrastructure/HttpUtilities.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs
Outdated
Show resolved
Hide resolved
Tratcher
left a comment
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.
gfoidl's method splitting suggestion is worth trying.
src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.Generated.cs
Outdated
Show resolved
Hide resolved
|
After the most recent change, there's some marginal improvement across the board from the previous
|
src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs
Outdated
Show resolved
Hide resolved
|
@Tratcher any other concerns? |
Fixes #33522 by rejecting CR/LF's in headers in Kestrel. Benchmark data before/after:
Before:
After:
The biggest loss was 10.4% in
Utf8BytesToString KeepAlive, other benchmarks were between a 2% gain and a 3% loss.Also fixes #34402