Guillaume Nodet created CAMEL-5420:
--------------------------------------
Summary: Camel transforms relative uri in a bad way
Key: CAMEL-5420
URL: https://issues.apache.org/jira/browse/CAMEL-5420
Project: Camel
Issue Type: Bug
Affects Versions: 2.10.0
Reporter: Guillaume Nodet
When defining an endpoint with a relative uri such as
protocol:mypath1/mypath2
camel transforms the given uri into the following:
protocol://mypath1/mypath2
Note that this transformation is performed before the component is given the
uri as it is done in DefaultCamelContext#getEndpoint() in the call to
normalizeEnpointUri().
This has the big problem that mypath1 is not considered the path anymore, but
rather the authority (host:port).
So if a component wants to support both relative and absolute uris, it has no
real way to know if the original uri contained an authority or not.
It is possible to support absolute uris with no authority though, as
protocol:/mypath1/mypath2
is converted to
protocol:///mypath1/mypath2
I'm not sure why relative uris are transformed into absolute uris, which does
not really seem like a good idea to me.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira