-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for servletPath prefix with PathPatternParser in Spring MVC #26445
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Comments
This was referenced Mar 7, 2021
Merged
This was referenced Mar 14, 2021
This was referenced Mar 16, 2021
Open
This was referenced Apr 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Currently, when parsed patterns are configured for use, we create a
RequestPath
by parsing therequestURI
without having to decode it first which avoids issues with encoded reserved characters. ForpathWithinApplication()
we take into account thecontextPath
but not theservletPath
. It is a challenge to work with theservletPath
because it is decoded and somewhat normalized and that makes it difficult to use to do a sub-string match against therequestURI
in order to determine the remaining path.This is okay for the needs of the default Servlet mapping
"/"
which is the most common way to configure the DispatcherServlet but in some cases there is a need to run two Servlets side by side.The goal of this issue is to add support for allow the DispatcherServlet to be mapped by prefix, so it can run side by side with another Servlet, and still be able to enable use of parsed patterns. We can do this by checking that the
HttpServletMapping
isMappingMatch.PATH
(Servlet 4.0+), re-encoding the servletPath in order to make it comparable to therequestURI
, and then exposing aRequestPath
that omitscontextPath
and theservletPath
from thepathWithinApplication()
.The text was updated successfully, but these errors were encountered: