[ 
https://issues.apache.org/jira/browse/CAMEL-6986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-6986.
--------------------------------

    Resolution: Won't Fix

> RAW query parameter doesn't work as expected
> --------------------------------------------
>
>                 Key: CAMEL-6986
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6986
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.11.2
>            Reporter: Ulrich Kramer
>
> The following test shows the problem.
> {code}
> @Test
> public void testRaw() throws Exception {
>     final String password = "%7Az";
>     CamelContext context = new DefaultCamelContext();
>     context.addComponent("test", new DefaultComponent() {
>         @Override
>         protected Endpoint createEndpoint(final String uri, final String 
> remaining,
>                 final Map<String, Object> parameters)
>                 throws Exception {
>             if (!parameters.remove("password").equals(password)) {
>                 throw new Exception("Invalid password");
>             }
>             return new DefaultEndpoint() {
>                 @Override
>                 public Producer createProducer() throws Exception {
>                     return null;
>                 }
>                 @Override
>                 public Consumer createConsumer(final Processor processor) 
> throws Exception {
>                     return null;
>                 }
>                 @Override
>                 public boolean isSingleton() {
>                     return false;
>                 }
>             };
>         }
>     });
>     context.getEndpoint("test:///?password=RAW(" + password + ")");
> }
> {code}
> With userRawUri it works. But than other parameter must be manually decoded.
> In my opinion the raw-feature is not the correct answer to encode passwords. 
> It's not transparent to the user.  I think normal URI encoding could do the 
> job, if you implement normalizeEndpointUri with primitive string 
> manipulations and without java.net.URI.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to