Spring controller mapping does not match some encoded URL strings

I have this mapping:

@GetMapping("/{example}") public void example(@PathVariable String example) { ... } 

The following URLs match and delete this method:

  • /foo
  • /f%20oo

These are not (I get 404):

  • /f%0Doo
  • /f%0Aoo

Why not?

How can I match URLs containing these encoded characters?

Change I looked at PathMatchConfigurer but can't see how this behavior is explained.

+5
source share

Source: https://habr.com/ru/post/1271192/


All Articles