Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CXF-8597: CXF JAXRS client not closing HTTP connections #851

Merged
merged 3 commits into from
Sep 23, 2021

Conversation

reta
Copy link
Member

@reta reta commented Sep 17, 2021

Relates to #697, the entity input stream is indeed not closed after consumption. But according to the specification for public abstract <T> T readEntity(Class<T> entityType, Annotation[] annotations):

A message instance returned from this method will be cached for subsequent retrievals via getEntity(). Unless the supplied entitytype is an input stream, this method automatically closes the an unconsumed original response entity data stream if open.

  • Add Test Case(s) for WebClient
  • Add Test Case(s) for JAXRSClientFactoryBean

@reta reta force-pushed the CXF-8597 branch 2 times, most recently from b9a40c6 to 4fbc05e Compare September 19, 2021 01:39
@@ -55,7 +55,6 @@
import javax.ws.rs.ext.ReaderInterceptor;
import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
import javax.xml.stream.XMLStreamReader;
import javax.xml.transform.Source;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should javax.xml.transform.Source be part of the JAXRSUtils::isStreamingOutType ?

@reta reta closed this Sep 21, 2021
@reta reta deleted the CXF-8597 branch September 21, 2021 01:41
@reta reta reopened this Sep 21, 2021
@reta reta marked this pull request as ready for review September 21, 2021 01:41
Copy link
Contributor

@andymc12 andymc12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks @reta!

@reta reta merged commit d6a449a into apache:master Sep 23, 2021
reta added a commit that referenced this pull request Sep 24, 2021
* CXF-8597: CXF JAXRS client not closing HTTP connections

* Added test case for generic WebClient flow

* Added test case for generic JAXRSClientFactoryBean / proxy flow

(cherry picked from commit d6a449a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants