I don't think it's expected behaviour. Normally I configure timeouts and
the like in the AsyncHttpClientConfig directly. Doing that, the
CamelHttpPath header works properly.

I will check what you said, but it definitely sounds like a bug.

Raúl.
On 27 Aug 2015 04:17, "Minh Tran" <darth.minhs...@gmail.com> wrote:

> Hi
>
> I've come across a strange behaviour with the http4 component on 2.15.2.
> If I have the following in my route
>
> <setHeader headerName="CamelHttpPath">
>         <constant>/my/path</constant>
> </setHeader>
> <to uri="http4:myhost:80"/>
>
> then it works just fine hitting http://myhost:80/my/path
>
>
> However I now have a need to set the connect and read timeouts on this so
> I've done the following
>
> <setHeader headerName="CamelHttpPath">
>         <constant>/my/path</constant>
> </setHeader>
> <to
> uri="http4:myhost:80?httpclient.connectTimeout=10000&amp;httpclient.socketTimeout=120000"/>
>
>
> Now it ignores the CamelHttpPath header and hits http://myhost:80. I can
> verify this by enabling logging in httpclient.
>
> If I then change it to the following where I add the path directly to the
> uri and skip the setHeader element
>
> <to
> uri="http4:myhost:80/my/path?httpclient.connectTimeout=10000&amp;httpclient.socketTimeout=120000
> "/>
>
> It hits the correct link. So it looks like the CamelHttpPath gets ignored
> if I add any options to the http4 uri. Is this expected behaviour?
>
> Thanks
> Minh

Reply via email to