[
https://issues.apache.org/jira/browse/WICKET-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479529
]
Jean-Baptiste Quenot commented on WICKET-40:
--------------------------------------------
Using a slash in one of the parameter's key or value is another story because
the URI is already decoded by the servlet container or web server. So it leads
to unmatched key pair error because request.getURI() already returns a decoded
URI like
/niceurl/path/to/page2/param2/sla/sh/param1/sss
You have to encode the encoded slash, like this:
http://localhost:8080/wicket-examples/niceurl/path/to/page2/param2/sla%252Fsh/param1/sss
On the older wicket snapshost, triple encode seems to be needed:
http://www.wicket-library.com/wicket-examples/niceurl/path/to/page2/param2/sla%25252Fsh/param1/sss
In other words, the servlet API does not offer a facility for parsing query
parameters in this form using slashes, only using the query string beginning
with "?" so you'd better avoid encoding slashes in the bookmarkable page
parameters. Wicket does its best to parse the slashes-delimited query
parameters, but it's far from being perfect.
> Parameters of nice URL's pages with 'sensitive' characters
> ----------------------------------------------------------
>
> Key: WICKET-40
> URL: https://issues.apache.org/jira/browse/WICKET-40
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.2.3
> Reporter: Jan Bareš
> Assigned To: Alastair Maw
>
> Wicket uses HttpServletRequest.getPathInfo() to get the the URL. The returned
> string is already URL decoded, so when the request parameter pair contains
> %2F, it will be returned as '/', so the request pair will be broken (the same
> applies to other characters like '+' etc). This was cseen with Jetty 6 and
> Tomcat 5.5.
> Wicket should use HttpServletRequest.getRequestURI() or getRequestURL() as
> this seems to return URL as it was passed to the server.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.