Escaping Endpoint URIs in Camel

Camel endpoint URIs (eg for file or sftp endpoints) are URI encoded. This can cause problems with the URI needs to contain special characters such as "+". This might occur with a regex filter for example:


Here the + would be treated as a URI-encoded space, and the regex would likely not match as expected.

A simple way around this is to use the RAW operator. This can be placed around a regex. To return to the previous example, one could put:


and all should be well.

Posted on December 23, 2014 and filed under dev.