You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Uh oh!
There was an error while loading. Please reload this page.
Adam Michalik opened SPR-15232 and commented
ServletRequest.getProtocol()
JavaDoc saysHowever,
MockHttpServletRequest.protocol
defaults to"http"
which violates the contract of the JavaDoc.There is no way to override this default when using
MockMvc
andMockHttpServletRequestBuilder
, so the defaultMockHttpServletRequest.protocol
should rather be"HTTP/1.1"
so that it better resembles a real-life HTTP request.Affects: 4.3.6
Issue Links:
The text was updated successfully, but these errors were encountered: