You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2013/05/01 11:40:17 UTC
[jira] [Commented] (WICKET-4664) Url#getQueryString(charset) method
returns quesrystring with "?" prefixed to it
[ https://issues.apache.org/jira/browse/WICKET-4664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13646483#comment-13646483 ]
Martin Grigorov commented on WICKET-4664:
-----------------------------------------
I've created a simple Servlet:
public class Serv extends HttpServlet
{
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
System.err.println("qs: " + request.getQueryString());
System.err.println("url: " + new URL("http://host/path?query=value").getQuery());
}
}
In both cases '?' is not in the query string:
qs: aaa=bb
url: query=value
Also both of them return null when there is no query string.
So I think Wicket's Url should do the same.
> Url#getQueryString(charset) method returns quesrystring with "?" prefixed to it
> -------------------------------------------------------------------------------
>
> Key: WICKET-4664
> URL: https://issues.apache.org/jira/browse/WICKET-4664
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0-beta3
> Reporter: vineet semwal
> Fix For: 7.0
>
>
> i have just pointed out 6.0.0-beta3/6.x but it must be same in 1.5.x too ,afaik "?" is not considered part of querystring ,"?" is considered separator see http://tools.ietf.org/html/rfc3986#section-3
> this method is used in Url#toString() too which can be easily fixed but it may be used at other places too so i don't know if removing "?" will break things now.
> so how things break currently
> RequestUtils.decodeParameters(url.getQueryString(),parameters);
> decodeparameters will considered first key to be "?key"
> so may be requestutils#decodeparameters method should strip away "?" if it's present in the query string before populating pageparameters
> thanks!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira