Skip to content
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

Fix method HttpHeadersNonValidated uses to get HeaderDescriptor #62150

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

stephentoub
Copy link
Member

We have two non-public methods for getting a HeaderDescriptor from a string name, one static on HeaderDescriptor and one instance on HttpHeaders. HttpHeadersNonValidated was using the former, but this then doesn't take into account custom logic used by HttpHeaders in other methods, like TryAddWithoutValidation, which means some methods on HttpHeadersNonValidated can't find the corresponding headers.

Fixes #62024

We have two non-public methods for getting a HeaderDescriptor from a string name, one static on HeaderDescriptor and one instance on HttpHeaders.  HttpHeadersNonValidated was using the former, but this then doesn't take into account custom logic used by HttpHeaders in other methods, like TryAddWithoutValidation, which means some methods on HttpHeadersNonValidated can't find the corresponding headers.
@ghost
Copy link

ghost commented Nov 29, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

We have two non-public methods for getting a HeaderDescriptor from a string name, one static on HeaderDescriptor and one instance on HttpHeaders. HttpHeadersNonValidated was using the former, but this then doesn't take into account custom logic used by HttpHeaders in other methods, like TryAddWithoutValidation, which means some methods on HttpHeadersNonValidated can't find the corresponding headers.

Fixes #62024

Author: stephentoub
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@stephentoub stephentoub merged commit aa03df0 into dotnet:main Nov 30, 2021
@stephentoub stephentoub deleted the fixheaders branch November 30, 2021 15:04
@stephentoub
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1521505280

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent HttpHeadersNonValidated behavior when response header added to a request
4 participants