File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
web/src/test/java/org/springframework/security/web/server/csrf Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 24
24
import reactor .test .StepVerifier ;
25
25
import reactor .test .publisher .PublisherProbe ;
26
26
27
+ import org .springframework .http .HttpMethod ;
27
28
import org .springframework .http .HttpStatus ;
28
29
import org .springframework .http .MediaType ;
29
30
import org .springframework .mock .http .server .reactive .MockServerHttpRequest ;
@@ -216,7 +217,7 @@ public void filterWhenXorServerCsrfTokenRequestAttributeHandlerAndRawTokenThenAc
216
217
// gh-8452
217
218
public void matchesRequireCsrfProtectionWhenNonStandardHTTPMethodIsUsed () {
218
219
MockServerWebExchange nonStandardHttpExchange = MockServerWebExchange
219
- .from (MockServerHttpRequest .method ("non-standard-http-method" , "/" ));
220
+ .from (MockServerHttpRequest .method (HttpMethod . valueOf ( "non-standard-http-method" ) , "/" ));
220
221
ServerWebExchangeMatcher serverWebExchangeMatcher = CsrfWebFilter .DEFAULT_CSRF_MATCHER ;
221
222
assertThat (serverWebExchangeMatcher .matches (nonStandardHttpExchange ).map (MatchResult ::isMatch ).block ())
222
223
.isTrue ();
You can’t perform that action at this time.
0 commit comments