camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Würl (JIRA) <j...@apache.org>
Subject [jira] [Updated] (CAMEL-7353) Configuring an endpoint with a hostname starting with "http" leads to an URISyntaxException
Date Wed, 09 Apr 2014 06:34:14 GMT

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

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

    Description: 
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. 

  was:
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 introduce with 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}
helps to solve the problem and does not break any test. 


> Configuring an endpoint with a 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)

Mime
View raw message