-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[7.0-rc2] Allow spaces between the url and http version #43704 #43706
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
[7.0-rc2] Allow spaces between the url and http version #43704 #43706
Conversation
|
Hi @Tratcher. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
| // Consume space | ||
| offset++; | ||
|
|
||
| while ((uint)offset < (uint)requestLine.Length |
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.
I guess there will be a small perf hit in HTTP/1.1 parsing from this extra check. Check benchmarks?
I wonder whether it would be faster to integrate logic to skip extra spaces to the for loops in path and query string that check for a space.
|
/benchmark plaintext aspnet-perf-lin kestrel |
|
Benchmark started for plaintext on aspnet-perf-lin with kestrel |
plaintext - aspnet-perf-lin
|
|
@sebastienros can we change PR benchmarks to optionally compare the exact same number of requests? |
|
@davidfowl such a niche case that maybe at that point better to trigger it from the command line tool and add the special crank arguments you want. Otherwise I might add a special profile for that. I don't recall if they are already handles or if something needs to be implemented. Wouldn't hurt if not. And provide a list of available extra profiles to use with their descriptions. |
|
Approved for .NET 7 RC2. |
|
Reviewers, please approve. If we want to attempt further optimizations, we can do that in 8. |
| "CUSTOM / HTTP/1.1\r\n", | ||
| "CUSTOM / HTTP/1.1\r\n", | ||
| "CUSTOM / HTTP/1.1 \r\n", | ||
| "CUSTOM / HTTP/1.1 \r\n", |
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.
Out of curiosity, do we know if HTTP.sys would accept any of the above invalid requests?
|
@wtgodbe @adityamandaleeka please merge. |
|
/benchmark plaintext,json aspnet-citrine-lin,aspnet-citrine-win kestrel |
Allow spaces between the url and http version
Description
This is a change to allow requests that have extra spaces between the url and http version. E.g. "GET(sp)/(sp)(sp)HTTP/1.1\r\n". The spec only allows one space, but some clients send more than one and IIS/Http.Sys allow it.
Contributes to #43705
Customer Impact
The customer regressed when moved to Kestrel. The customer doesn't expect to be able to update/replace the affected clients for 3+ years.
Regression?
Not a regression in Kestrel, but a compat break for customers moving from IIS/Http.Sys.
Risk
Constrained, unit testable.
Verification
Packaging changes reviewed?