You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/04/07 10:42:54 UTC

[3/4] camel git commit: Check to see if disableStreamCache is enabled before consuming the httpResponse entity

Check to see if disableStreamCache is enabled before consuming the httpResponse entity


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fbf5bcf8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fbf5bcf8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fbf5bcf8

Branch: refs/heads/camel-2.17.x
Commit: fbf5bcf8df972ea531fd1e469acd08a77f5f736e
Parents: 6efd046
Author: Edward Welch <ed...@edjusted.com>
Authored: Wed Apr 6 07:35:10 2016 -0400
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 7 10:42:35 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/http4/HttpProducer.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fbf5bcf8/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
index 7622d02..4edc6c5 100644
--- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
+++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
@@ -179,7 +179,7 @@ public class HttpProducer extends DefaultProducer {
                 }
             }
         } finally {
-            if (httpResponse != null) {
+            if (httpResponse != null && !getEndpoint().isDisableStreamCache()) {
                 try {
                     EntityUtils.consume(httpResponse.getEntity());
                 } catch (IOException e) {