Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA3C0CDBF for ; Mon, 26 May 2014 06:32:29 +0000 (UTC) Received: (qmail 19605 invoked by uid 500); 26 May 2014 06:32:29 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 19553 invoked by uid 500); 26 May 2014 06:32:29 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 19546 invoked by uid 99); 26 May 2014 06:32:29 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2014 06:32:29 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 959D29A4F4E; Mon, 26 May 2014 06:32:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ningjiang@apache.org To: commits@camel.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: CAMEL-7457 polish the code with the suggestion of Clause Date: Mon, 26 May 2014 06:32:29 +0000 (UTC) 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 Authored: Mon May 26 14:31:57 2014 +0800 Committer: Willem Jiang 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]*"); }