-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Christopher Anderson opened SPR-6528 and commented
Take the following REST endpoint:
@RequestMapping("/lat/{latitude}/long/{longitude}")
public void testLatLong(@PathVariable Double latitude, @PathVariable Double longitude) {
System.out.println("Latitude = " + latitude);
System.out.println("Longitude = " + longitude);
}
If you hit this with the URL
/lat/123/long/456
However, if the URL contains doubles with a decimal place e.g.:
/lat/2.3/long/445
The endpoint is not longer hit, i.e. we get a 404.
Interestingly, if we change the type of the PathVariables to String:
@RequestMapping("/lat/{latitude}/long/{longitude}")
public void testLatLong(@PathVariable String latitude, @PathVariable String longitude) {
System.out.println("Latitude = " + latitude);
System.out.println("Longitude = " + longitude);
}
It will not work when latitude or longitude contains a fullstop. However, a comma will work instead of a fullstop in this case.
Affects: 3.0 M4
Issue Links:
- Url suffix after dot is omitted [SPR-6518] #11184 Url suffix after dot is omitted
Referenced from: commits 8678652
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug