However with Servlet based servers we end up with a NettyStreamedHttpResponse for the proxied request. This has a null body, and so we end up with an empty response to proxied request.
NettyStreamedHttpResponse is a package private class, so there's no way of detecting or interacting with it in ServletHttpHandler.encodeResponse where I believe the body should be somehow passed across
In https://github.com/micronaut-projects/micronaut-core/pull/9724 we added a server TCK test for rewriting the request URI as shown in the documentation here https://docs.micronaut.io/latest/guide/#proxyClient
This works fine with Netty based servers.
However with Servlet based servers we end up with a
NettyStreamedHttpResponse
for the proxied request. This has a null body, and so we end up with an empty response to proxied request.NettyStreamedHttpResponse
is a package private class, so there's no way of detecting or interacting with it inServletHttpHandler.encodeResponse
where I believe the body should be somehow passed acrossThis was discovered when verifying this issue in servlet https://github.com/micronaut-projects/micronaut-servlet/issues/262