You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matej Knopp (JIRA)" <ji...@apache.org> on 2007/08/26 20:09:30 UTC

[jira] Resolved: (WICKET-611) AbstractRequestTargetUrlCodingStrategy ignores query parameters if there is no parameter in the path

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

Matej Knopp resolved WICKET-611.
--------------------------------

    Resolution: Fixed

> AbstractRequestTargetUrlCodingStrategy ignores query parameters if there is no parameter in the path
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-611
>                 URL: https://issues.apache.org/jira/browse/WICKET-611
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.2.6, 1.3.0-beta1
>            Reporter: Kent Tong
>            Priority: Minor
>             Fix For: 1.3.0-beta4
>
>
> In AbstractRequestTargetUrlCodingStrategy in the decodeParameters() method, if there is no parameter specified in the path such as http://localhost:8080/Hello/app/foo?p1=def (assuming the page has been mounted as /foo), then it will immediately return an empty map, ignoring the possible query parameters (p1):
> 	protected ValueMap decodeParameters(String urlFragment, Map urlParameters)
> 	{
> 		// Hack off any leading slash
> 		if (urlFragment.startsWith("/"))
> 		{
> 			urlFragment = urlFragment.substring(1);
> 		}
> 		if (urlFragment.length() == 0)
> 		{
> 			return new ValueMap();  // RETURN IMMEDIATELY
> 		}
> 		...
> 		if (urlParameters != null)
> 		{
> 			parameters.putAll(urlParameters);  // THIS CODE IS NOT REACHED
> 		}
> 		return parameters;
> 	}

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