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 2013/07/31 15:42:09 UTC

git commit: CAMEL-6590 Fixed Restlet header warnings with thanks to David

Updated Branches:
  refs/heads/camel-2.10.x 1bae95f00 -> 8bd19b449


CAMEL-6590 Fixed Restlet header warnings with thanks to David


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

Branch: refs/heads/camel-2.10.x
Commit: 8bd19b4495f1e1e3349c3c7223dde80a0190ee17
Parents: 1bae95f
Author: Willem Jiang <ni...@apache.org>
Authored: Wed Jul 31 14:22:21 2013 +0800
Committer: Willem Jiang <ni...@apache.org>
Committed: Wed Jul 31 21:41:27 2013 +0800

----------------------------------------------------------------------
 .../camel/component/restlet/RestletHeaderFilterStrategy.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8bd19b44/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
----------------------------------------------------------------------
diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
index 62f44a1..a269169 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.restlet;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultHeaderFilterStrategy;
+import org.restlet.engine.http.header.HeaderConstants;
 
 /**
  * Default header filtering strategy for Restlet
@@ -37,6 +38,8 @@ public class RestletHeaderFilterStrategy extends DefaultHeaderFilterStrategy {
         // The "CamelAcceptContentType" header is not added to the outgoing HTTP 
         // headers but it will be going out as "Accept.
         getOutFilter().add(Exchange.ACCEPT_CONTENT_TYPE);
-
+        
+        // Remove the restlet headers from the out message.
+        getOutFilter().add(HeaderConstants.ATTRIBUTE_HEADERS);
     }
 }