Double slashes (optional Path variable) removed via MockHttpServletRequestBuilder [SPR-13435] #18014
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Oliver Lehmann opened SPR-13435 and commented
When running a Unittest with MockHttpServletRequestBuilder I have the following URI for example:
/test//currentlyValid/0
After Calling
MockMvcRequestBuilders.get(uri);
The uri inside the returning builder is set to/test/currentlyValid/0
The double slash was replaced by a single slash!
This was done by the following code in
org.springframework.web.util.UriComponentsBuilder.FullPathComponentBuilder
What is the point in replacing double slashes by a single slash? How am I supposed to test usecases with optional path variables?
For me, this feels like a bug to report....
Affects: 4.1.7
Referenced from: commits df171ff
The text was updated successfully, but these errors were encountered: