camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CAMEL-7353) Configuring an http4 endpoint with hostname starting with "http" leads to an URISyntaxException
Date Wed, 09 Apr 2014 07:14:20 GMT

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

Willem Jiang reassigned CAMEL-7353:
-----------------------------------

    Assignee: Willem Jiang

> 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
>            Assignee: Willem Jiang
>         Attachments: CAMEL-7353.patch
>
>
> 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)

Mime
View raw message