camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CAMEL-1977) Camel HTTP binding incorrectly filters out the headers
Date Mon, 14 Sep 2009 10:38:13 GMT

     [ https://issues.apache.org/activemq/browse/CAMEL-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-1977.
--------------------------------

    Resolution: Fixed

Thanks for reporting.

trunk: 814567.

> 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
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>         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.


Mime
View raw message