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

Gary Tully commented on CAMEL-324:
----------------------------------

yea, it is the marshaller that does the copy, but going to any different 
exchange would do it.

One option is to add a .removeHeader("Content-Length") to your route rather 
than in the camel source. However I don't think this should be necessary, imho 
the Content-Length headers should never be copied/propagated from a HttpMessage.

I have posted to the dev list to get some feedback before I prepare a patch for 
this.

> bad content length header value in http response
> ------------------------------------------------
>
>                 Key: CAMEL-324
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-324
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-http
>    Affects Versions: 1.3.0
>            Reporter: alex c
>            Assignee: Gary Tully
>            Priority: Critical
>
> By default HttpBinding class copies all request header attributes from the 
> request to the response including 'Content-Length'. So the consequence is 
> that the response is declaring the same size as the request which can lead to 
> serious truncation problems! 
> the workaround is simply to add the line:
> out.removeHeader("Content-Length"); 
> in the writeResponse method of the httpbinding class allowing jetty to set 
> the right value.  

-- 
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