[ 
https://issues.apache.org/jira/browse/CAMEL-16269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17349035#comment-17349035
 ] 

Karen Lease commented on CAMEL-16269:
-------------------------------------

TheĀ  strategy mentioned in the description is 
org.apache.camel.http.common.HttpProtocolHeaderFilterStrategy which is 
instantiated in the HttpProducer as final. It is only used when copying the 
Exchange.in headers to the Exchange.out headers if the "copyHeaders" property 
is true. According to the comment in HttpProducer.java, the goal of this filter 
is:
{code:java}
// to avoid overriding existing headers with old values just
// filter the http protocol headers  {code}
But it seems unlikely that most of the listed headers would be set on the 
incoming Exchange message.
Would it be possible to only copy the Exchange.in headers to Exchange.out if 
they are not already present on the out message, since the Http Response 
headers have already been copied to Exchange.out.

> camel-http - Optimize its protocol header filter strategy
> ---------------------------------------------------------
>
>                 Key: CAMEL-16269
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16269
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-http
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 3.x
>
>
> When mapping response http headers, then there is a filter strategy with 47 
> known keys to skip. This is inefficient to loop the same 47 keys every time 
> and match against lower casing incoming http keys.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to