Description
Mike Noordermeer opened SPR-15643 and commented
#15727 made some changes to the URL processing, which seem to work for most of the cases, but not for 1 specific case: encoded backslashes in paths.
I have a DispatcherServlet
mapped to /
, and am using a UrlPathHelper
with urlDecode
set to false
. When I issue a request to /testcontroller/test%5Ctest
, this is mapped to /testcontroller/test/test
instead of /testcontroller/test\test
. This is because Tomcat rewrites the %5C
to /
in the servlet path.
I should probably set alwaysUseFullPath
, but maybe this can be fixed by rewriting backslashes to forward slashes in getPathWithinServletMapping()
as well?
P.S., Tomcat is running with the options necessary to support %5C
in url's (org.apache.catalina.connector. CoyoteAdapter.ALLOW_BACKSLASH
and org.apache.tomcat.util.buf. UDecoder.ALLOW_ENCODED_SLASH
).
Affects: 4.3.8
Issue Links:
- URLs containing %2F (forward slash) are not mapped correctly to @RequestMapping methods [SPR-11101] #15727 URLs containing %2F (forward slash) are not mapped correctly to
@RequestMapping
methods
Referenced from: commits e37af83