[ https://issues.apache.org/activemq/browse/CAMEL-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-1977: ---------------------------------- Assignee: Claus Ibsen > 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 > 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.