reta edited a comment on pull request #866:
URL: https://github.com/apache/cxf/pull/866#issuecomment-957452885


   > 
   > 
   > I'm thinking that it is incorrect to close the `Response` after reading it 
(see my comments in the test case). I'm wondering if we could pass the 
cast-type to a new `ResponseImpl` that should only be used on the client - the 
caller would need to specify what the response entity is intended to be cast to 
by proxy-based clients (JAX-RS clients would continue using the existing 
constructors). Then if the proxy-based client returns a `Response`, we leave 
the behavior the same as JAX-RS, but otherwise we would close after reading. 
Wdyt?
   
   Thanks @andymc12 , I would certainly prefer to keep it unchanged (and not 
close the response after reading), having a hard time to fit CXF into the TCK / 
spec space without changing that.
   
   Also, I have consulted Jersey as the reference implementation and the  the 
`Response` entity is indeed closed after reading, so I think we are changing 
the right parts (see please 
https://github.com/eclipse-ee4j/jersey/blob/master/core-common/src/main/java/org/glassfish/jersey/message/internal/InboundMessageContext.java#L896).
 
   
   Would be great to understand what I am missing here?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to