camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: URI encoding is giving me problems
Date Tue, 22 Apr 2014 07:03:24 GMT

Even after adding RAW the output of key still comes as RAW(+) and not only + as expected.

addParameter method of URISupport class should strip out the RAW() and just retain + against

Here is what I tried.

                        EndpointConfiguration conf = comp.createConfiguration("test:");

Any idea what is missing ?

-----Original Message-----
From: Claus Ibsen []
Sent: Tuesday, April 22, 2014 10:51 AM
Subject: Re: URI encoding is giving me problems


See this FAQ

On Tue, Apr 22, 2014 at 6:17 AM, Stephen Cameron <> wrote:
> Hi,
> I have a plus (+) symbol in a parameter value that is being converted
> to a space. When I encode this as %2B it still ends up as a space in
> the parameter value.
> In fact, both %20 and %2B end up giving me spaces in the parameter value.
> The following shows the issue
> DefaultCamelContext context = new DefaultCamelContext(); MockComponent
> comp = new MockComponent(); comp.setCamelContext(context);
> EndpointConfiguration conf = comp.createConfiguration("test:
> System.out.println(conf.getParmeter("secretKey"));
> conf.setParameter("secretKey","A+- A");
> System.out.println(conf.getParmeter("secretKey"));
> Output is:
> A - A
> A+- A
> The first should be the same as the second.
> Thanks
> Steve Cameron

Claus Ibsen
Red Hat, Inc.
Twitter: davsclaus
Author of Camel in Action:
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s)
and may contain confidential and privileged information. If you are not the intended recipient(s),
please reply to the sender and destroy all copies of the original message. Any unauthorized
review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or
any action taken in reliance on the contents of this e-mail is strictly prohibited and may
be unlawful.
View raw message