camel-users mailing list archives

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

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
passwd.

Here is what I tried.

                        EndpointConfiguration conf = comp.createConfiguration("test:https://test.com?PASSWD=RAW(+)");
                        System.out.println(conf.getParameter("PASSWD"));

Any idea what is missing ?

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
Sent: Tuesday, April 22, 2014 10:51 AM
To: users@camel.apache.org
Subject: Re: URI encoding is giving me problems

Hi

See this FAQ
http://camel.apache.org/how-do-i-configure-password-options-on-camel-endpoints-without-the-value-being-encoded.html

On Tue, Apr 22, 2014 at 6:17 AM, Stephen Cameron <steve.cameron.62@gmail.com> 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:
> https://test.com?secretKey=A%2B-%20A");
> 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.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/
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.
Mime
View raw message