Hi, given the following URI (/note the blank in the file name/):
sftp://...../foo?fileName=RAW(bla .zip) and the following code will break, i.e. will not download the file as expected public Exchange receive(final String uri) { final Endpoint endpoint = consumerTemplate.getCamelContext().getEndpoint(uri); ... return consumerTemplate.receive(*endpoint*); } whereas the following code works as expected: public Exchange receive(final String uri) { final Endpoint endpoint = consumerTemplate.getCamelContext().getEndpoint(uri); ... return consumerTemplate.receive(*uri*); } through heavy debugging we found the reason: The getEndpoint() call will cause the URI to be escaped as ...&fileName=RAW(bla%20.zip). OK so far. Yet within the receive() method the URI is escaped a *second* time! This causes the final URI to read as ...&fileName=RAW(bla%2520.zip), i.e. the % sign is escaped, too. The download then fails of course... I' d regard this as a bug in Camel... (Tested with 2.16.3 and 2.18.3) Cheers Markus -- View this message in context: http://camel.465427.n5.nabble.com/Bug-in-RAW-URI-encoding-of-endpoint-tp5796603.html Sent from the Camel Development mailing list archive at Nabble.com.
