-
Notifications
You must be signed in to change notification settings - Fork 1.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
[essentials] ensure WebUtils.ParseQueryString captures fragment parameters #15662
[essentials] ensure WebUtils.ParseQueryString captures fragment parameters #15662
Conversation
Hey there @rdavisau! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
@dotnet-policy-service agree |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
My understanding is that query parameters MUST come before the URI fragment (which can only be terminated by the end of the URI). https://www.rfc-editor.org/rfc/rfc3986#section-3.5 Can you show me where my interpretation is wrong? There's also this syntax: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this gets merged, lets make sure that it is valid to have a query string located within the fragment of a URI. I don't believe that it is valid.
Maybe the confusion comes from the name of the method Originally, (despite the name) it had the behaviour of "extract all parameters from the url" and handled parameters whether they were in query string and/or fragment. That's covered by tests for the class and is also mentioned as the expected behaviour here. The perf change made |
Well, based on the comment that specifically states that it is meant to parse the fragment as if it contained query parameters, then I guess the correct solution here is to parse both sets as your patch does. |
Description of Change
Makes
WebUtils.ParseQueryString
extract parameters from bothUri.Query
andUri.Fragment
, resolving a regression from net8p4 to net8p5.Issues Fixed
Fixes #15661