Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CDF051798A for ; Mon, 16 Mar 2015 12:51:16 +0000 (UTC) Received: (qmail 62363 invoked by uid 500); 16 Mar 2015 12:51:16 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 62330 invoked by uid 500); 16 Mar 2015 12:51:16 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 1276 invoked by uid 99); 16 Mar 2015 12:20:08 -0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of richard.groote@gmail.com does not designate 162.253.133.43 as permitted sender) Date: Mon, 16 Mar 2015 05:18:13 -0700 (MST) From: richardgroote To: users@camel.apache.org Message-ID: <1426508293235-5764220.post@n5.nabble.com> In-Reply-To: References: <1426173441204-5764045.post@n5.nabble.com> Subject: Re: Cacehe-Controle header MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, We used the below header strategy on the servlet component to allow some headers. public class ParameterizedHttpHeaderFilterStrategy extends DefaultHeaderFilterStrategy { private final String[] allowedOutHeaders; public ParameterizedHttpHeaderFilterStrategy(String allowedOutHeaders) { this.allowedOutHeaders = allowedOutHeaders.split(","); } protected void initialize() { setOutFilter(getParameterizedOutFilter()); setLowerCase(true); // filter headers begin with "Camel" or "org.apache.camel" // must ignore case for Http based transports setOutFilterPattern("(?i)(Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]*"); } protected Set getParameterizedOutFilter() { Set outFilter = new HashSet(); outFilter.add("content-length"); outFilter.add("content-type"); outFilter.add("host"); // Add the filter for the Generic Message header // http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.5 outFilter.add("cache-control"); outFilter.add("connection"); outFilter.add("date"); outFilter.add("pragma"); outFilter.add("trailer"); outFilter.add("transfer-encoding"); outFilter.add("upgrade"); outFilter.add("via"); outFilter.add("warning"); for(String allowedOutHeader: allowedOutHeaders){ outFilter.remove(allowedOutHeader.toLowerCase()); } return outFilter; } } Kind regards, Richard -- View this message in context: http://camel.465427.n5.nabble.com/Cacehe-Controle-header-tp5764045p5764220.html Sent from the Camel - Users mailing list archive at Nabble.com.