Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.11.4, 2.12.3, 2.13.0
-
None
-
Patch Available
-
Unknown
Description
Trying to configure an endpoint like
http4://http.org
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):
// need to set scheme on address uri depending on if its secure or not String addressUri = remaining.startsWith("http") ? remaining : null;
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
String addressUri == null;
would solve the problem and does not break any test.