Mock request with non-standard HTTP method in test #8594
Labels
in: build
An issue in the build
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Our build is failing when running against the latest Spring Framework snapshot.
The test
matchesRequireCsrfProtectionWhenNonStandardHTTPMethodIsUsed
is failing, because Spring Framework 5.2.7 will no longer allow anull
HTTP method.Instead, it provides a method to set a custom HTTP method as a
String
.That method is not available in versions prior to 5.2.7, so we cannot use it yet.
In order to be compatible with both version of Spring Framework, we should mock
ServerHttpRequest
in our test, instead of usingMockServerHttpRequest
.Once Spring Framework 5.2.7 is available we can switch to using the new builder method.
gh-8592 was created to use the new builder method when it becomes available.
The text was updated successfully, but these errors were encountered: