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 16:13:33 UTC
[2/4] 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/7683c4db
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7683c4db
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7683c4db
Branch: refs/heads/camel-2.14.x
Commit: 7683c4db29a53c272b9fb6264d98f9c06485fcfb
Parents: 83bfbc5
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 22:11:55 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/7683c4db/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 9774118..93f493c 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 {