Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 68504 invoked from network); 2 Sep 2009 07:44:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Sep 2009 07:44:34 -0000 Received: (qmail 95046 invoked by uid 500); 2 Sep 2009 07:44:34 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 95007 invoked by uid 500); 2 Sep 2009 07:44:34 -0000 Mailing-List: contact dev-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 dev@camel.apache.org Received: (qmail 94997 invoked by uid 500); 2 Sep 2009 07:44:33 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 94994 invoked by uid 99); 2 Sep 2009 07:44:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 07:44:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 07:44:32 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 31E93234C004 for ; Wed, 2 Sep 2009 00:44:12 -0700 (PDT) Message-ID: <1644639697.1251877452187.JavaMail.jira@brutus> Date: Wed, 2 Sep 2009 00:44:12 -0700 (PDT) From: "Ivan S. Dubrov (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Created: (CAMEL-1977) Camel HTTP binding incorrectly filters out the headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org Camel HTTP binding incorrectly filters out the headers ------------------------------------------------------ Key: CAMEL-1977 URL: https://issues.apache.org/activemq/browse/CAMEL-1977 Project: Apache Camel Issue Type: Bug Components: camel-http Affects Versions: 2.0.0 Reporter: Ivan S. Dubrov Attachments: http-header-filter-case-insensitive.patch Camel does not filter out internal headers when creating HTTP response. The internal headers like "CamelBeanMultiParameterArray" occur in HTTP response. The reason is that in the following piece of code (from DefaultHttpBinding.java, around line 157): {code} for (String key : message.getHeaders().keySet()) { String value = message.getHeader(key, String.class); if (headerFilterStrategy != null && !headerFilterStrategy.applyFilterToCamelHeaders(key, value, exchange)) { response.setHeader(key, value); } } {code} the "key" returned is lowercase, even in case the real header is "CamelBeanMultiParameterArray" (because CaseInsensitiveMap is used, which turns all keys to lowercase). Since pattern match in DefaultHeaderFilterStrategy is case-sensitive, the header is not filter out when filling the response headers. The suggested solution is to make pattern case-insensitive. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.