You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2015/05/27 10:31:42 UTC

[2/5] camel git commit: CAMEL-8774 merge the patch into camel-http

CAMEL-8774 merge the patch into camel-http


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

Branch: refs/heads/master
Commit: 75c622c449d36f3f92397ee0fed2911216ca35c2
Parents: 497b177
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed May 27 16:29:14 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed May 27 16:31:29 2015 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/http/HttpProducer.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/75c622c4/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
index 8eb7035..32b7c05 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
@@ -66,6 +66,7 @@ public class HttpProducer extends DefaultProducer {
     private HttpClient httpClient;
     private boolean throwException;
     private boolean transferException;
+    private HeaderFilterStrategy httpProtocolHeaderFilterStrategy = new HttpProtocolHeaderFilterStrategy();
 
     public HttpProducer(HttpEndpoint endpoint) {
         super(endpoint);
@@ -193,7 +194,8 @@ public class HttpProducer extends DefaultProducer {
 
         // preserve headers from in by copying any non existing headers
         // to avoid overriding existing headers with old values
-        MessageHelper.copyHeaders(exchange.getIn(), answer, false);
+        // Just filter the http protocol headers 
+        MessageHelper.copyHeaders(exchange.getIn(), answer, httpProtocolHeaderFilterStrategy, false);
     }
 
     protected Exception populateHttpOperationFailedException(Exchange exchange, HttpMethod method, int responseCode) throws IOException, ClassNotFoundException {