Skip to content

[doc] Document urlDecode=false implies alwaysUseFullPath=true [SPR-15643] #20202

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: commits e37af83

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions