You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by pmcb55 <mc...@dnb.com> on 2013/10/30 16:22:51 UTC

How to stop URLDecoding on *path* of URI (*NOT* query parameters)?

Hi,

Using Camel 2.11.0, we have an unusual requirement of needing to invoke this
type of URI:

*http://www.example.com/service/hello%3Fworld/*

Note the '%3F' in the *path* of the URI, which is the encoding for '?'. 

This is very different than handling query parameters, for which we
successfully use the latest 'RAW()' feature of Camel (thankfully 'RAW()' was
implemented just in time for us to use it!), i.e.

*http://www.example.com/service?query=RAW(hello?world)*

So if I attempt the following Camel code:

 
*from("direct:test").to("http4://www.example.com/service/hello%3Fworld/");*

...Camel URLDecodes this URI to instead invoke on:
http4://www.example.com/service/hello?world/, which HTTP interprets as a URI
having a query parameter of 'world/'.

If I use a browser to invoke our URI:
'http://www.example.com/service/hello%3Fworld/', it works fine. So I guess
we need something like 'RAW()' for the URI path (and obviously '?' is not
the only character we need to work with, we need '/', '\', '&', '#' etc.
too!).

Does anyone know if this is possible with Camel??

Thanks,

Pat.




--
View this message in context: http://camel.465427.n5.nabble.com/How-to-stop-URLDecoding-on-path-of-URI-NOT-query-parameters-tp5742409.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to stop URLDecoding on *path* of URI (*NOT* query parameters)?

Posted by pmcb55 <mc...@dnb.com>.
Anyone got any suggestions at all....?!!?



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-stop-URLDecoding-on-path-of-URI-NOT-query-parameters-tp5742409p5742546.html
Sent from the Camel - Users mailing list archive at Nabble.com.