Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock request with non-standard HTTP method in test #8594

Closed
eleftherias opened this issue May 26, 2020 · 0 comments
Closed

Mock request with non-standard HTTP method in test #8594

eleftherias opened this issue May 26, 2020 · 0 comments
Assignees
Labels
in: build An issue in the build status: backported An issue that has been backported to maintenance branches type: bug A general bug

Comments

@eleftherias
Copy link
Contributor

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 a null 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 using MockServerHttpRequest.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: build An issue in the build status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants