-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HttpHeaders TryParse can throw #102584
Comments
Tagging subscribers to this area: @dotnet/ncl |
Given that this appears with |
The issue is that enumerating a header collection should never throw, even if we encounter invalid values that were added via TryAddWithoutValidation. We should change the logic here such that we don't throw anymore, likely by only looking for the relevant whitespace characters as part of ctor validation. On a side note, we shouldn't be using validating constructors from TryParse in the first place as that's just wasted cycles to do validation twice. |
Found by https://github.com/dotnet/runtime/blob/main/src/libraries/Fuzzing/DotnetFuzzing/Fuzzers/HttpHeadersFuzzer.cs
The text was updated successfully, but these errors were encountered: