You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andreas Würl (JIRA)" <ji...@apache.org> on 2014/04/09 08:48:15 UTC

[jira] [Updated] (CAMEL-7353) Configuring an http4 endpoint with hostname starting with "http" leads to an URISyntaxException

     [ https://issues.apache.org/jira/browse/CAMEL-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Würl updated CAMEL-7353:
--------------------------------

    Summary: Configuring an http4 endpoint with hostname starting with "http" leads to an URISyntaxException  (was: Configuring an endpoint with a hostname starting with "http" leads to an URISyntaxException)

> Configuring an http4 endpoint with hostname starting with "http" leads to an URISyntaxException
> -----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-7353
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7353
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http4
>    Affects Versions: 2.11.4, 2.12.3, 2.13.0
>            Reporter: Andreas Würl
>
> Trying to configure an endpoint like
> {code}
> http4://http.org
> {code}
> where the hostname starts with the characters "http" leads to an URISyntaxException "Expected scheme-specific part at index http4:"
> This behaviour is caused by the following lines in camel-http4's HttpComponent (around line 211):
> {code}
>         // need to set scheme on address uri depending on if its secure or not
>         String addressUri = remaining.startsWith("http") ? remaining : null;
> {code}
> In our case, the hostname is not prefixed with http:// or https:// which leads to the mentioned exception.
> The code in question was introduced within CAMEL-6880. I'm not shure why the variable {{remaining}} is checked for a protocol prefix as it already comes without one. Setting
> {code}
>         String addressUri == null;
> {code}
> would solve the problem and does not break any test. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)