camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: [DISCUSS] Should camel enforce usage of proper URIs?
Date Thu, 21 Jun 2012 01:21:57 GMT
I think camel accepts the invalid URIs is a tread off for making the URI 
readable for the human. As we develop the components in the old days we 
don't have the rule to for the URI be validated.
So we added lots of extra codes to handle the camel URI separately.

I'm open to validate the URI in the camel core, but we still need to 
think about how to make the user easy to use and read these URI not just 
for the easy life of the tools. It is not acceptable we just show or let 
the the user use an encoded URI which have lots of "%x%x".

On 6/11/12 10:32 PM, Hadrian Zbarcea wrote:
> This is not a new topic, but it looks like it's coming back in different
> threads. Since this is is the underlying issue, I'd suggest clarifying
> this first.
> At the core of the issue is a call to
> UnsafeUriCharactersEncoder.encode(uri) in
> DefaultComponent.createEndpoint(String), that made camel silently accept
> invalid URIs and then opened the gates to component writers using URIs
> that are not URIs. This behavior was there from the very beginning of
> Camel. (I refactored that code to introduce a deprecated from start
> preProcessUri that provided a path for cleaning up before camel-3.0, but
> that's a separate topic).
> To me, personally, using valid URIs for endpoints is a no-brainer, but I
> sense that there is disagreement on that.
> Thoughts?
> Hadrian

Blog: (English)
Twitter: willemjiang
Weibo: willemjiang

View raw message