Skip to content
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

URL parameters in GET request would not ge properly url-encoded #9387

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

pakaufmann
Copy link

The + sign would not get encoded, but decoded, resulting in a space, which in turn resulted in invalid parameters on the server side.

This should fix this issue #7747.

As the encode() in RestTemplate only works when using expanded variables (spring-projects/spring-framework#21577), instead of directly adding the parameters to the queryParams, this creates variables which are expanded for all inputted query params.

…+ sign would not get encoded, but decoded, resulting in a space, which in turn resulted in invalid parameters on the server side
@pakaufmann pakaufmann force-pushed the fix-url-encoding-for-resttemplate branch 3 times, most recently from 9c58e19 to 3a3e011 Compare April 18, 2019 13:41
@pakaufmann
Copy link
Author

Ok, so apparently this cannot be achieved in Sprint 4.3.9 (or any Spring 4 version for that matter). So, can the Rest-Template be updated to Spring 5? Or is this not wanted, as it should work with Spring 4?

@pakaufmann pakaufmann force-pushed the fix-url-encoding-for-resttemplate branch 4 times, most recently from d8a87c2 to cad68cd Compare April 24, 2019 13:25
@pakaufmann pakaufmann force-pushed the fix-url-encoding-for-resttemplate branch from cad68cd to e64fc11 Compare April 24, 2019 14:15
@pakaufmann
Copy link
Author

pakaufmann commented Apr 24, 2019

So, instead of trying to make it backwards-compatible I added a new config-parameter "spring5". If activated it generates the demo client with spring5, which then fixes the bug there. Per default it is deactivated in order to stay backwards compatible.

@mangatmodi
Copy link

Hey guys,
Any decision on this one, This is really important and breaks many things.

@durcon
Copy link

durcon commented Mar 27, 2024

Why is this fix after 5 years still not merged? Who can merge this pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants