In Spring Framework 5.2.7, MockServerHttpRequest will accept a custom HTTP method as a String parameter.
Going forward we should use
MockServerHttpRequest.method("CUSTOM-HTTP-METHOD", "/")
when testing a request with a custom HTTP method.
The test matchesRequireCsrfProtectionWhenNonStandardHTTPMethodIsUsed will need to be updated.
Reference: https://github.com/spring-projects/spring-framework/issues/25109
Comment From: eleftherias
Hey @midumitrescu, I see you have already left a comment on the Spring Framework issue.
It looks like the classes you are mentioning, MockServerHttpRequest, HttpMethod are all part of Spring Framework.
Is there a change you a proposing for Spring Security as well?
Comment From: midumitrescu
hey @eleftherias :)
Sorry, I was confused.
The original ticket got closed and I assumed the work will be continued here.
I just deleted my comments