-
Notifications
You must be signed in to change notification settings - Fork 567
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
WebClient - Uri resolved without query params when path and query params are mixed. #8566
Comments
The ClientRequestBase class did not properly resolve URIs when path- and query parameters were mixed. More specifically, the query parameters were stripped if the URI template was absolute.
The ClientRequestBase class did not properly resolve URIs when path- and query parameters were mixed. More specifically, the query parameters were stripped if the URI template was absolute.
@VerKWer This is absolutely fine. If you found a solution, just create PR and assign me as a reviewer :-) |
Glad to hear it :). I'm not sure I have the rights to assign reviewers. The PR is #8614, linked to this issue. |
While looking into this, I noticed that the If the provided URI is absolute, the existing query parameters are cleared and replaced by the ones from the provided URI. Otherwise, the query parameters are merged. Clearly, merging the query parameters can be useful when constructing URIs but I'm puzzled by the exception for absolute paths. As far as I can tell from looking at the RFC, whether the path is absolute has no influence on the resolved query parameters. Maybe @tomas-langer has some insights here, having written the original |
The ClientRequestBase class did not properly resolve URIs when path- and query parameters were mixed. More specifically, the query parameters were stripped if the URI template was absolute.
I would expect the resolved uri to be the same in all four examples below. Instead, the query params are missing when path and query params are mixed when building requests.
Environment Details
Problem Description
See tests below. The test fails for
test1
andtest2
. Would expect the same result as for the other two tests.Steps to reproduce
The text was updated successfully, but these errors were encountered: