Skip to content

Reactive path matching does not consider servlet context path [SPR-14714] #19279

@spring-projects-issues

Description

@spring-projects-issues

Arjen Poutsma opened SPR-14714 and commented

When mapping against path patterns, the HttpRequestPathHelper currently uses the path as returned from HttpRequest.getURI().getRawPath() as lookup path. However, when running in a servlet environment, this lookup path represents the entire path (including servlet context), which is not desirable.

Proposed solution: add a getPath() method to HttpRequest, defaulting to return getURI().getRawPath(), but with an override in ServletServerHttpRequest to return the proper lookup path (obtained from UrlPathHelper.


Affects: 5.0 M1

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions