You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Jean-Baptiste Quenot <jb...@apache.org> on 2007/08/21 11:58:29 UTC

Re: svn commit: r562171 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java

* almaw@apache.org:
> Author: almaw
> Date: Thu Aug  2 09:26:24 2007
> New Revision: 562171
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=562171
> Log:
> WICKET-748
> 
> Modified:
>     wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
> 
> @@ -155,7 +157,15 @@
>  		String tmp = getRelativePathPrefixToWicketHandler();
>  		PrependingStringBuffer prepender = new PrependingStringBuffer(tmp);
>  
> -		String path = Strings.replaceAll(getPath(), "%3A", ":").toString();
> +		String path;
> +		try
> +		{
> +			path = URLDecoder.decode(Strings.replaceAll(getPath(), "%3A", ":").toString(), "UTF-8");
> +		}
> +		catch (UnsupportedEncodingException e)
> +		{
> +			throw new WicketRuntimeException(e);
> +		}

Correct me if I'm wrong, but shouldn't you write
URLDecoder.decode(getPath()) instead?  The result is the same, but
we can remove code.
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/