-
Notifications
You must be signed in to change notification settings - Fork 6k
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
base: master
Are you sure you want to change the base?
URL parameters in GET request would not ge properly url-encoded #9387
Conversation
…+ sign would not get encoded, but decoded, resulting in a space, which in turn resulted in invalid parameters on the server side
9c58e19
to
3a3e011
Compare
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? |
d8a87c2
to
cad68cd
Compare
cad68cd
to
e64fc11
Compare
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. |
Hey guys, |
Why is this fix after 5 years still not merged? Who can merge this pull request? |
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.