You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HttpUtility.ParseQueryString doesn't roundtrip when there are multiple values for the same key, behavior is inconsistent with .NET Framework #27518
As mentioned by @karelz in dotnet/corefx#32578 (comment), there's another case that is handled by .NET Framework but not by .NET Core: keys without values, i.e. name&another. This should probably be a separate issue, though.
As mentioned by @karelz in #32578 (comment), there's another case that is handled by .NET Framework but not by .NET Core: keys without values, i.e. name&another. This should probably be a separate issue, though.
Activity
thomaslevesque commentedon Oct 2, 2018
The issue still exists in 2.2 preview
karelz commentedon Oct 2, 2018
Confirmed that it fails on .NET Core 2.0 (when it was introduced). On .NET Framework (4.7.2) the result is correct.
After a bit debugging it seems to be difference in implementations:
HttpValueCollectionwhich specializes multi-values: https://referencesource.microsoft.com/#System.Web/HttpValueCollection.cs,334 (callsNameValueCollection.GetKeys)HttpQSCollectionwhich does not specialize multi-values (callsNameValueCollection.indexer)https://github.com/dotnet/corefx/blob/a10890f4ffe0fadf090c922578ba0e606ebdd16c/src/System.Web.HttpUtility/src/System/Web/HttpUtility.cs#L59-L63
This should be fairly simple to fix. Anyone interested?
davidsh commentedon Oct 2, 2018
There is already a PR for this submitted: dotnet/corefx#32578
karelz commentedon Oct 2, 2018
Darn, I missed that :(
thomaslevesque commentedon Oct 3, 2018
As mentioned by @karelz in dotnet/corefx#32578 (comment), there's another case that is handled by .NET Framework but not by .NET Core: keys without values, i.e.
name&another. This should probably be a separate issue, though.thomaslevesque commentedon Oct 3, 2018
Opened https://github.com/dotnet/corefx/issues/32598 to take care of this.