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

Use String to specify custom HTTP method in mock request #8592

Closed
eleftherias opened this issue May 25, 2020 · 2 comments
Closed

Use String to specify custom HTTP method in mock request #8592

eleftherias opened this issue May 25, 2020 · 2 comments
Assignees
Labels
in: config An issue in spring-security-config status: blocked An issue that's blocked on an external project change type: enhancement A general enhancement
Milestone

Comments

@eleftherias
Copy link
Contributor

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: spring-projects/spring-framework#25109

@eleftherias eleftherias added in: config An issue in spring-security-config type: enhancement A general enhancement status: blocked An issue that's blocked on an external project change labels May 25, 2020
@eleftherias eleftherias self-assigned this May 25, 2020
@eleftherias
Copy link
Contributor Author

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?

@midumitrescu
Copy link

midumitrescu commented May 28, 2020

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

@eleftherias eleftherias added this to the 5.4.0-RC1 milestone Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config status: blocked An issue that's blocked on an external project change type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants