2008/2/13, Tully, Gary <[EMAIL PROTECTED]>:
> Currently, the unmarshaller copies the input message to the output
> message and augments it. The copy brings with it all of the http
> headers.
> The result is that Content-Length from the request ends in the reply.
> This breaks the http response[1].

I don't think it is caused by unmarshaller really. Basically it is the
behaviour of pipeline to copy the result of the pipeline (either in or
out message) into out message of original exchange. I write it without
looking at the code, so it could be wrong ;)

> One solution is to add a .removeHeader("Content-Length") to the route
> but should that be necessary?
> the header really belongs with the in message.
>
> I am thinking that it never makes sense to copy a Content-Length header
> from a HttpMessage but it would be wrong to remove it.

I don't think we want to remove any header by default. If I don't see
a header I assume that there was no such header. If there is
Content-Length, then it should be in the message.

I would vote for the solution implemented in JMS case James mentioned
about. BTW it is consistent with the same solution we have implemented
for CAMEL-254 (notice my comment on the issue).

Roman

Reply via email to