camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Minh Tran <>
Subject http4 ignoring CamelHttpPath
Date Thu, 27 Aug 2015 03:16:45 GMT

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

View raw message