I have a Spring RestController with a RequestMapping and a PathVariable:
@RequestMapping(value = "/path/{someId:.+}")
public void method(@PathVariable("someId") String someId) {
...
}
When calling this controller, I get a Http 406 Not Acceptable error with requests like:
- /path/id8327.123
- /path/id8327.txt
But not with:
- /path/id8327.234
- /path/id8327.bbb
Isn't that strange?
It was only recently I found out that .txt
also failed, so I guess it has something to do with extension mappings.
How can I work around this hidden feature?
Kind regards