Skip to content

WebFlux fails with WebDAV HTTP methods #29981

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

Closed
SergiyDyrda opened this issue Feb 15, 2023 · 1 comment
Closed

WebFlux fails with WebDAV HTTP methods #29981

SergiyDyrda opened this issue Feb 15, 2023 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: regression A bug that is also a regression
Milestone

Comments

@SergiyDyrda
Copy link

Affects: 6.0.3


Hi folks!
I have Spring Cloud Gateway application that consumes HTTP PROPFIND method.

Now I am trying to migrate it from Spring Boot 2 to Spring Boot 3 that in turns upgrading version of spring-webflux from 5.3.22 to 6.0.3
that causes issue:

Original Stack Trace:
		at java.base/java.lang.Enum.valueOf(Enum.java:273)
		at org.springframework.web.bind.annotation.RequestMethod.valueOf(RequestMethod.java:35)
		at org.springframework.web.reactive.result.condition.RequestMethodsRequestCondition.matchRequestMethod(RequestMethodsRequestCondition.java:157)
		at org.springframework.web.reactive.result.condition.RequestMethodsRequestCondition.getMatchingCondition(RequestMethodsRequestCondition.java:135)
		at org.springframework.web.reactive.result.method.RequestMappingInfo.getMatchingCondition(RequestMappingInfo.java:269)
		at org.springframework.web.reactive.result.method.RequestMappingInfoHandlerMapping.getMatchingMapping(RequestMappingInfoHandlerMapping.java:91)
		at org.springframework.web.reactive.result.method.RequestMappingInfoHandlerMapping.getMatchingMapping(RequestMappingInfoHandlerMapping.java:63)
		at org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping.addMatchingMappings(AbstractHandlerMethodMapping.java:366)
		at org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping.lookupHandlerMethod(AbstractHandlerMethodMapping.java:328)
		at org.springframework.web.reactive.result.method.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:297)
		at org.springframework.web.reactive.result.method.RequestMappingInfoHandlerMapping.getHandlerInternal(RequestMappingInfoHandlerMapping.java:105)
		at org.springframework.web.reactive.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:187)
		at org.springframework.web.reactive.DispatcherHandler.lambda$handle$0(DispatcherHandler.java:150)

So looks like issue has been raised inside org.springframework.web.reactive.result.condition.RequestMethodsRequestCondition#matchRequestMethod.
Previously org.springframework.http.HttpMethod was enum and for PROPFIND method argument was null. Now it is a class that can contain any value inside. Therefore it reaches point where it tries to convert org.springframework.http.HttpMethod to org.springframework.web.bind.annotation.RequestMethod that in turns fails with aforementioned exception.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 15, 2023
@poutsma poutsma self-assigned this Feb 16, 2023
@sdeleuze
Copy link
Contributor

I can reproduce, looks WebFlux specific (WebMvc works fine for the same use case).

@poutsma poutsma added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Feb 16, 2023
@poutsma poutsma added this to the 6.0.6 milestone Feb 16, 2023
@poutsma poutsma added type: regression A bug that is also a regression and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Feb 16, 2023
@poutsma poutsma changed the title Spring Web Flux fails with non-regular HTTP methods WebFlux fails with WebDAV HTTP methods Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

4 participants