You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by glenner003 <gl...@gmail.com> on 2016/02/04 11:55:30 UTC
Duplicate http Content-Length header
Hi all,
We are having an issue with the restlet producer.
In the class HttpMethodCall, the headers are copied to the request headers,
except for the Content-Length header.
However, in some cases we end up with two of these headers:
<http://camel.465427.n5.nabble.com/file/n5777209/restlet-httpheaders.jpg>
One with upper case L and one with lower case l. Only the one with capital L
is filtered out, resulting in an error further on, because apache http
processes these headers case insensitive and throw a ProtocolException with
the message "Content-Length header already present".
Further debugging revealed that the header "Content-length" is already
available right after the restlet consumer kicks in.
Regards,
Glenn
--
View this message in context: http://camel.465427.n5.nabble.com/Duplicate-http-Content-Length-header-tp5777209.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Duplicate http Content-Length header
Posted by Claus Ibsen <cl...@gmail.com>.
What version of Camel do you use?
And yeah it looks like a little bug, you are welcome to log a JIRA ticket.
http://camel.apache.org/support.html
On Thu, Feb 4, 2016 at 11:55 AM, glenner003 <gl...@gmail.com> wrote:
> Hi all,
>
> We are having an issue with the restlet producer.
> In the class HttpMethodCall, the headers are copied to the request headers,
> except for the Content-Length header.
>
> However, in some cases we end up with two of these headers:
> <http://camel.465427.n5.nabble.com/file/n5777209/restlet-httpheaders.jpg>
> One with upper case L and one with lower case l. Only the one with capital L
> is filtered out, resulting in an error further on, because apache http
> processes these headers case insensitive and throw a ProtocolException with
> the message "Content-Length header already present".
>
>
> Further debugging revealed that the header "Content-length" is already
> available right after the restlet consumer kicks in.
>
> Regards,
>
> Glenn
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Duplicate-http-Content-Length-header-tp5777209.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2