-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ViaHeaderValue throws on TryParse #72677
Comments
Tagging subscribers to this area: @dotnet/ncl Issue Detailsvar headers = new HttpResponseMessage().Headers;
headers.TryAddWithoutValidation("Via", "1.1 foo.bar, foo");
foreach (var h in headers) { } // Throws
This would silently succeed without throwing (but still storing a
|
Triage: Regression against 5.0 -- throwing is much worse (from |
TryParse
should never throw. In this case, it throws from theViaHeaderValue
ctor as theprotocolVersion
was not parsed. I assume this debug assert would trigger here as well.This would silently succeed without throwing (but still storing a
null
value) before 5.0 (#47205).The text was updated successfully, but these errors were encountered: