spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

NPE in NettyRoutingFilter upon PROPFIND request

Open bcelenk opened this issue 7 years ago • 3 comments

Bug report

Gateway version:2.0.2.RELEASE

PROPFIND, which is a WebDAV method instead of a HTTP method causes NPE in NettyRoutingFilter.

final HttpMethod method = HttpMethod.valueOf(request.getMethod().toString());

Since the org.springframework.http.HttpMethod doesn't recognize the PROPFIND, toString() results in NPE.

Bug also persists in latest version. 2.1.0.RC3

bcelenk avatar Jan 16 '19 12:01 bcelenk

Can you try Greenwhich snapshots? I think that was resolved via https://github.com/spring-cloud/spring-cloud-gateway/pull/741/files. We might need to cherry pick it to the 2.0.x branch though.

ryanjbaxter avatar Jan 17 '19 16:01 ryanjbaxter

That PR addressed and fixed this issue, thanks!

A cherry pick'd be great though.

bcelenk avatar Jan 18 '19 08:01 bcelenk

NVM its already there ;) https://github.com/spring-cloud/spring-cloud-gateway/blob/2.0.x/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/NettyRoutingFilter.java#L92

ryanjbaxter avatar Jan 18 '19 14:01 ryanjbaxter