Skip to content

RESTful URLs with path variables containing dots are incorrectly mapped [SPR-6231] #10899

@spring-projects-issues

Description

@spring-projects-issues

Martin Desrosiers opened SPR-6231 and commented

The change made in #10208 effectively strips any file extension in GET requests in order to exclude it from the path variable value. Unfortunately, this prevents queries that contains dots as part of the path variable, i.e. an email address. Therefore the following request:

http://localhost:8080/rest/emailaddress/email/test%40mail.com

with the following controller request mapping:

@RequestMapping(value = "/email/{email}", method = RequestMethod.GET)
public ModelAndView getEmail(@PathVariable("email") final String email) {
}

will map the value "test@mail" to the variable email.


Affects: 3.0 RC1

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions