Provide access to servletPath in ServletRequestPathUtils #34379
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
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 thePathPatternRequestMatcher
in spring-projects/spring-security#16499 to useServletRequestPathUtils
rather than replicate what it does.The text was updated successfully, but these errors were encountered: