Description
ServletRequestPathUtils
exposes methods to parse and cache the request path. The expectation is to match the application portion of the path, excluding common parts (applicationContext, servletPath).
Spring Security is making comprehensive changes to use PathPatternParser
for path matching in spring-projects/spring-security#16417. However, as it may need to secure endpoints in a multiple Servlet deployment scenario, it needs to be able to match the servletPath.
ServletRequestPathUtils
has some specific logic to determine the servletPath that targets the multiple Servlets deployment scenario with mapping by path prefix. It would be useful to expose that so that Spring Security can access the servletPath and use it for matching purposes in the same way that Spring MVC does. It would also make possible for the PathPatternRequestMatcher
in spring-projects/spring-security#16499 to use ServletRequestPathUtils
rather than replicate what it does.