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

Christian Mueller updated CAMEL-2452:
-------------------------------------

    Attachment: HttpHeaderFilterStrategy.patch
                HttpHeaderFilterStrategyTest.patch

Hey Claus,
you are too fast for me... :-)

I attached a unit test to show what the problem is (in my opinion).
You are right, the http header are case intensive, but the 
HttpHeaderFilterStrategy (extends DefaultHeaderFilterStrategy) expect the 
filter keys in lower case, if the 'lowerCase' attribute is set to true (which 
is the case for HttpHeaderFilterStrategy). If the filter keys are defined in 
upper case or camel case, the filter will never applied.

{code}
        if (filter != null) {
            if (isLowerCase()) {
                if (filter.contains(headerName.toLowerCase())) {
                    return true;
                }
            } else {
                if (filter.contains(headerName)) {
                    return true;
                }
            }
        }
{code}

Regards,
Christian

> HttpHeaderFilterStrategy dosn't filters out 'Cache-Control', 'Connection', 
> 'Pragma', 'Trailer', 'Transfer-Encoding', 'Upgrade', 'Via' and 'Warning' in 
> method applyFilterToCamelHeaders
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2452
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2452
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-http
>    Affects Versions: 2.1.0
>         Environment: All
>            Reporter: Christian Mueller
>            Assignee: Christian Mueller
>             Fix For: 2.3.0
>
>         Attachments: HttpHeaderFilterStrategy.patch, 
> HttpHeaderFilterStrategyTest.patch
>
>
> HttpHeaderFilterStrategy uses the HTTP headers with upper case characters on 
> the beginning (e. g. 'Transfer-Encoding' instead of 'transfer-encoding').

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to