'Spring WebFlux and CalDav HTTP methods

I want to create a react-spring (with Netty underhood) proxy that can handle CalDav HTTP methods like REPORT. If I use the ProxyExchange object in the controller it doesn't understand the REPORT method and I get an NPE when using the proxy.forward() method. How can I teach webflux to understand REPORT?

My controller code:

@Controller
public class RestController {

    @RequestMapping(value = "/")
    public Mono<ResponseEntity<byte[]>> proxy(ProxyExchange<byte[]> proxy, ServerHttpRequest request) {
        UriComponents uriComponents = UriComponentsBuilder
                .fromHttpUrl("https://myhost.com")
                .path(request.getPath().value())
                .queryParams(request.getQueryParams())
                .build();

        return proxy
                .sensitive(HttpHeaders.HOST)
                .uri(uriComponents.toUri().toASCIIString())
                .forward();
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source