Romain Manni-Bucau created CXF-7964:
---------------------------------------

             Summary: 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


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to