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

Jeremy Thomerson updated WICKET-2125:
-------------------------------------

    Attachment: bugproducer.tar.gz

This is a quickstart using 1.4-SNAPSHOT (March 7, 2009) - could not reproduce.

> MixedParamUrlCodingStrategy fails when using a %2F in the URL
> -------------------------------------------------------------
>
>                 Key: WICKET-2125
>                 URL: https://issues.apache.org/jira/browse/WICKET-2125
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC2
>         Environment: Ubuntu 8.10, tomcat6 
>            Reporter: Rodrigo Benenson
>            Assignee: Jeremy Thomerson
>            Priority: Critical
>         Attachments: bugproducer.tar.gz
>
>
> Symptom: when clicking on a link created by Wicket the page appears blank. No 
> exception, no error page, only blank.
> Identified cause:
> I'm using
> mount(new MixedParamUrlCodingStrategy("my_page", MyPage.class, new 
> String[]{"key"} ) );
> and creating the URL using
> PageParameters page_parameters = new PageParameters();
> page_parameters.add("key", key);
> final String the_link_url = RequestUtils.toAbsolutePath(urlFor(MyPage.class, 
> page_parameters).toString());
> add(new ExternalLink("the_link", the_link_url));
> in some cases the key string can contain a "/" character. This is not a 
> problem since Wicket take cares of encoding the url correctly.
> For instance, if 
> final String key="ab/c";
> then the generated link will be
> http://my_server/my_page/ab%2Fc
> but this page will not render as expected. MixedParamUrlCodingStrategy is 
> bugged.
> Other values for the encoded key string work fine:
> http://my_server/my_page/abc
> http://my_server/my_page/ab%2Ec
> all work fine.
> %2F seems to be the cause of the symptom.
> Workaround:
> Use QueryStringUrlCodingStrategy instead
> mount(new QueryStringUrlCodingStrategy("my_page", MyPage.class ) );
> will generate
> http://my_server/my_page?key=ab%2Fc
> which works fine, as expected
> Patch:
> MixedParamUrlCodingStrategy needs to be fixed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to