Skip to content

Unexpected URI variables handling when expanded into already existing query parameter name (UriComponentsBuilder) #34781

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

Closed
christophejan opened this issue Apr 19, 2025 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another

Comments

@christophejan
Copy link
Contributor

With spring-web 6.2.5, I get the following behavior :

var uriOk = UriComponentsBuilder.fromUriString(“http://myhost?{pk1}={pv1}&{pk2}={pv2}”).buildAndExpand(“v1”, “v2”, “v3”, “v4”);
System.out.println(uriOk);

Output :

http://myhost?v1=v2&v3=v4

But :

var uriKo = UriComponentsBuilder.fromUriString(“http://myhost?{pk1}={pv1}&{pk2}={pv2}”).buildAndExpand(“v1”, “v2”, “v1”, “v4”);
System.out.println(uriKo);

Output :

http://myhost?v1=v4

I was expecting the following output for uriKo :

http://myhost?v1=v2&v1=v4
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 19, 2025
@christophejan christophejan changed the title Unexpected URI variables handling with query parameter (UriComponentsBuilder) Unexpected URI variables handling when expanded into already existing query parameter name (UriComponentsBuilder) Apr 21, 2025
@rstoyanchev rstoyanchev self-assigned this Apr 22, 2025
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 22, 2025
@rstoyanchev
Copy link
Contributor

Superseded by #34783.

@rstoyanchev rstoyanchev closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants