URI template encoding Bug in 10.x
See original GitHub issueHi.
Get http://localhost:8080/user/v1?userId=2020051417013580630000001&123
userId='2020051417013580630000001&123'
There is a ‘&’ symbol in the parameter causing segmentation error.



The actual received value is ‘2020051417013580630000001’

Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
'+' (plus sign) not encoded with RestTemplate using String url ...
6 to 2.1.2. We noticed, that when using RestTemplate, the '+' sign is not encoded to '%2B' anymore (changes by SPR-14828). This ...
Read more >Spring Boot REST Template URI Encoding - DZone
Use Spring's Rest Template to consume encoded endpoints compared to hard coded endpoints. Hard coded endpoints are prone to ...
Read more >URI Template RFC 6570 - IETF Datatracker
URI Template RFC 6570 · 1. Variable Expansion A variable that is undefined (Section 2.3) has no value and is ignored by the...
Read more >Using URL encoding to handle special characters in a ...
While it is possible to load documents into MarkLogic Server, where the document URI contains special characters not encoded, it is recommended ...
Read more >urlencode - Manual - PHP
This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Has the problem been solved?
@R-anybbo
URLEncoder.encode(userId, "UTF-8")Simply put, yes. I recommend you look over the RFC referenced for the background.
And yes
URLEncodercan help, but be careful when using it. It’s not designed to perform Percent Encoding, but to handleapplication/x-www-form-urlencodedvalues only, which are not the same as Percent Encoding.Some great reading on the subject
Since you’ve found your solution, I’m going to close this issue.