Camel HTTP Component is not allowing underscores in the hostname

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Camel HTTP Component is not allowing underscores in the hostname

Padma-Priya Kowlwar -Extern
Hello Everybody,

We are trying to connect to a https endpoint from our camel route using http4 component which has an underscore in the hostname. The endpoint looks like https://x_y.abc.zu.dw:1243/path  and we receive an error message  "Invalid uri: https:/path?chunked=true&httpClient.connectTimeout=XXXX&httpClient.socketTimeout=XXX&throwExceptionOnFailure=false&bridgeEndpoint=true If you are forwarding/bridging http endpoints, then enable the bridgeEndpoint option on the endpoint: https:/path?chunked=true&httpClient.connectTimeout=XXXX&httpClient.socketTimeout=XXX&throwExceptionOnFailure=false&bridgeEndpoint=true".

Usually it is against the valid host name rules but is there any way to fix in the http4 component to avoid the issue as the outbound system can't change their hostname currently.

I saw a similar kind of issue in https://issues.apache.org/jira/browse/CAMEL-4769.

If there is any possibility to fix this issue in camel http4 component, it will help us a lot.

Thanks,

Priya



________________________________

Pflichtangaben anzeigen<http://www.deutschebahn.com/pflichtangaben/20200205>

N?here Informationen zur Datenverarbeitung im DB-Konzern finden Sie hier: http://www.deutschebahn.com/de/konzern/datenschutz
Reply | Threaded
Open this post in threaded view
|

Re: Camel HTTP Component is not allowing underscores in the hostname

Claus Ibsen-2
Hi

You can extend the http4 component yourself and then try to see if you
can override (and copy the source if needed) from the existing
component to add in your workaround.

underscores are forbidden for hostnames so its an invalid name.

You can maybe also try to add a DNS name "hack" in etc/hosts (or
similar) on the node where you run Camel to map a valid hostname to
the ip of the underscored server, and then use the valid hostname.



On Tue, Feb 11, 2020 at 9:22 PM Padma-Priya Kowlwar -Extern
<[hidden email]> wrote:

>
> Hello Everybody,
>
> We are trying to connect to a https endpoint from our camel route using http4 component which has an underscore in the hostname. The endpoint looks like https://x_y.abc.zu.dw:1243/path  and we receive an error message  "Invalid uri: https:/path?chunked=true&httpClient.connectTimeout=XXXX&httpClient.socketTimeout=XXX&throwExceptionOnFailure=false&bridgeEndpoint=true If you are forwarding/bridging http endpoints, then enable the bridgeEndpoint option on the endpoint: https:/path?chunked=true&httpClient.connectTimeout=XXXX&httpClient.socketTimeout=XXX&throwExceptionOnFailure=false&bridgeEndpoint=true".
>
> Usually it is against the valid host name rules but is there any way to fix in the http4 component to avoid the issue as the outbound system can't change their hostname currently.
>
> I saw a similar kind of issue in https://issues.apache.org/jira/browse/CAMEL-4769.
>
> If there is any possibility to fix this issue in camel http4 component, it will help us a lot.
>
> Thanks,
>
> Priya
>
>
>
> ________________________________
>
> Pflichtangaben anzeigen<http://www.deutschebahn.com/pflichtangaben/20200205>
>
> N?here Informationen zur Datenverarbeitung im DB-Konzern finden Sie hier: http://www.deutschebahn.com/de/konzern/datenschutz



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2