-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Closed
Copy link
Labels
in: testIssues in the test moduleIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Adam Michalik opened SPR-15232 and commented
ServletRequest.getProtocol()
JavaDoc says
Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1.
However, MockHttpServletRequest.protocol
defaults to "http"
which violates the contract of the JavaDoc.
There is no way to override this default when using MockMvc
and MockHttpServletRequestBuilder
, so the default MockHttpServletRequest.protocol
should rather be "HTTP/1.1"
so that it better resembles a real-life HTTP request.
Affects: 4.3.6
Issue Links:
- MockHttpServletRequest.getReader() returns null in case of no content [SPR-15215] #19780 MockHttpServletRequest.getReader() returns null in case of no content
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug