[ https://issues.apache.org/jira/browse/CXF-7964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Romain Manni-Bucau updated CXF-7964: ------------------------------------ Description: Today (3.3.0), if you use a Client to get a response and copy it to return in an endpoint (http proxy pattern) like that: {code} private Response passthrough(final Response source) { final Response.ResponseBuilder builder = Response.status(source.getStatus()); source.getStringHeaders().entrySet().stream() .forEach(e -> builder.header(e.getKey(), String.join(",", e.getValue()))); final InputStream forwardedData = source.readEntity(InputStream.class); return builder.entity(forwardedData).build(); } {code} A client calling that endpoint will freeze cause of the forwarded input stream. Edit: the server endpoint returns a CompletionStage (tomcat 9.0.14 and cxf 3.3.0), I didn't take time yet to investigate if it is coming from the completion stage or not, I just know in some older 3.2 it was the stream which was not properly closed. Edit 2: the issue was the header "transfer-encoding" not filtered, could cxf ignore it by default maybe? was: Today (3.3.0), if you use a Client to get a response and copy it to return in an endpoint (http proxy pattern) like that: {code} private Response passthrough(final Response source) { final Response.ResponseBuilder builder = Response.status(source.getStatus()); source.getStringHeaders().entrySet().stream() .forEach(e -> builder.header(e.getKey(), String.join(",", e.getValue()))); final InputStream forwardedData = source.readEntity(InputStream.class); return builder.entity(forwardedData).build(); } {code} A client calling that endpoint will freeze cause of the forwarded input stream. Edit: the server endpoint returns a CompletionStage (tomcat 9.0.14 and cxf 3.3.0), I didn't take time yet to investigate if it is coming from the completion stage or not, I just know in some older 3.2 it was the stream which was not properly closed. > Ensure CXF JAXRS stack (client/server) can be used for roundtrips > ----------------------------------------------------------------- > > Key: CXF-7964 > URL: https://issues.apache.org/jira/browse/CXF-7964 > Project: CXF > Issue Type: Bug > Reporter: Romain Manni-Bucau > Priority: Major > > Today (3.3.0), if you use a Client to get a response and copy it to return in > an endpoint (http proxy pattern) like that: > {code} > private Response passthrough(final Response source) { > final Response.ResponseBuilder builder = > Response.status(source.getStatus()); > source.getStringHeaders().entrySet().stream() > .forEach(e -> builder.header(e.getKey(), String.join(",", > e.getValue()))); > final InputStream forwardedData = > source.readEntity(InputStream.class); > return builder.entity(forwardedData).build(); > } > {code} > A client calling that endpoint will freeze cause of the forwarded input > stream. > Edit: the server endpoint returns a CompletionStage (tomcat 9.0.14 and cxf > 3.3.0), I didn't take time yet to investigate if it is coming from the > completion stage or not, I just know in some older 3.2 it was the stream > which was not properly closed. > Edit 2: the issue was the header "transfer-encoding" not filtered, could cxf > ignore it by default maybe? -- This message was sent by Atlassian JIRA (v7.6.3#76005)