Skip to content

Conversation

@geoffkizer
Copy link
Contributor

Remove the _validator field by replacing with a check for GenericHeaderParser.TokenListParser, since this is the only thing validators were used for.

Remove the _specialValue field by pushing handling of special values to callers.

Fixes #63054
Fixes #63050

@ghost ghost added the area-System.Net.Http label Dec 21, 2021
@ghost ghost assigned geoffkizer Dec 21, 2021
@ghost
Copy link

ghost commented Dec 21, 2021

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

Issue Details

Remove the _validator field by replacing with a check for GenericHeaderParser.TokenListParser, since this is the only thing validators were used for.

Remove the _specialValue field by pushing handling of special values to callers.

Fixes #63054
Fixes #63050

Author: geoffkizer
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@geoffkizer geoffkizer merged commit d2ebffc into dotnet:main Dec 23, 2021
@geoffkizer geoffkizer deleted the cleanuphttpheadervaluecollection branch December 23, 2021 19:49
_allow = new HttpHeaderValueCollection<string>(KnownHeaders.Allow.Descriptor, this);
}
return _allow;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future cleanup, this can be simplified to just:

public ICollection<string> Allow => _allow ??= new HttpHeaderValueCollection<string>(KnownHeaders.Allow.Descriptor, this);

Same for some other props below.

@karelz karelz added this to the 7.0.0 milestone Jan 11, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Feb 10, 2022
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.

Remove HttpHeaderValueCollection<T>._specialValue field Remove HttpHeaderValueCollection<T>._validator field

4 participants