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 2014/05/26 08:32:29 UTC

git commit: CAMEL-7457 polish the code with the suggestion of Clause

Repository: camel
Updated Branches:
  refs/heads/master e8eb7ca79 -> e52b40392


CAMEL-7457 polish the code with the suggestion of Clause


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

Branch: refs/heads/master
Commit: e52b4039229149a20fce24b559cdbd097ff9439b
Parents: e8eb7ca
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon May 26 14:31:57 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon May 26 14:31:57 2014 +0800

----------------------------------------------------------------------
 .../cxf/jaxrs/CxfRsHeaderFilterStrategy.java       | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e52b4039/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
index 4972d99..bf73a3f 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
@@ -31,16 +31,15 @@ public class CxfRsHeaderFilterStrategy extends DefaultHeaderFilterStrategy {
     }
 
     protected void initialize() {
-        getOutFilter().add(CxfConstants.CAMEL_CXF_RS_RESPONSE_CLASS);
-        getOutFilter().add(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API);
-        getOutFilter().add(CxfConstants.CAMEL_CXF_RS_OPERATION_RESOURCE_INFO_STACK);
-        getOutFilter().add(CxfConstants.CAMEL_CXF_RS_VAR_VALUES);
-        getOutFilter().add(CxfConstants.OPERATION_NAME);
-        getOutFilter().add(Exchange.HTTP_METHOD);
-        getOutFilter().add(Exchange.HTTP_PATH);
-        getOutFilter().add(Exchange.DESTINATION_OVERRIDE_URL);
+        
+        getOutFilter().add(CxfConstants.OPERATION_NAME.toLowerCase());
+        
+        getOutFilter().add("Content-Type".toLowerCase());
+        // Support to filter the Content-Type case insensitive
+        setLowerCase(true);
+        
         // filter headers begin with "Camel" or "org.apache.camel"
-        setOutFilterPattern("((Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]*)|(?i)Content-Type");
+        setOutFilterPattern("(Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]*");
 
     }