Parameters passed using %-encoding will be double escaped by fromCurrentRequest():
@GetMapping
@ResponseBody
public Map<String, Object> test(@RequestParam MultiValueMap<String, String> params) {
return Map.of(
"params", params,
"uri", ServletUriComponentsBuilder.fromCurrentRequest().toUriString()
);
}
$ curl http://localhost:8080/?p=*
{"uri":"http://localhost:8080/?p=*","params":{"p":["*"]}}
$ curl http://localhost:8080/?p=%2a
{"uri":"http://localhost:8080/?p=%252a","params":{"p":["*"]}}
Spring Web 5.2.1.RELEASE
Parameters passed using %-encoding will be double escaped by
fromCurrentRequest():Spring Web 5.2.1.RELEASE