-
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
[release/6.0-rc2] Fix behavior ObjectCollection for single item contains #59557
[release/6.0-rc2] Fix behavior ObjectCollection for single item contains #59557
Conversation
Tagging subscribers to this area: @dotnet/ncl |
@stephentoub @geoffkizer can you please do final code review on this PR? Thanks! |
I've left comments on the original PR. |
Approved by tactics on email. |
@hoyosjs can you port the rest of the commits from the original PR ? |
I am waiting for the original to get fully reviewed - I will port the commit, but this is not ready to be merged until then. |
@hoyosjs is this now ready to merge ? |
It is. |
Changes ObjectCollection to use equality semantics for contain and removal of items instead of reference equality when there's a single item in the collection.
Backport of #59547 to release/6.0-rc2
Customer Impact
Customer reported break of app when checking parameters for HTTP headers that had a single value. This was a regression from 3.1.
Testing
Test added as part of this PR.
Risk
Low, there's internal usage of this and some behavioral changes (checking for
Parameters.Contains(null)
inContentDispositionHeaderValue
/MediaTypeHeaderValue
/NameValueWithParametersHeaderValue
/TransferCodingHeaderValue
when they have no parameters returns true), but all were incorrect