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
Modified:
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java?view=diff&rev=562171&r1=562170&r2=562171
==============================================================================
---
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
(original)
+++
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
Thu Aug 2 09:26:24 2007
@@ -16,6 +16,8 @@
*/
package org.apache.wicket.protocol.http.servlet;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
@@ -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);
+ }
if (path == null || path.length() == 0)
{
path = "";
@@ -218,9 +228,9 @@
{
return relativePathPrefixToWicketHandler;
}
-
+
PrependingStringBuffer prepender = new PrependingStringBuffer();
-
+
// For AJAX requests, we need to make the URLs relative to the
// original page.
if (isAjax())
@@ -431,16 +441,16 @@
*/
public String toString()
{
- return "[method = " + httpServletRequest.getMethod() + ",
protocol = "
- + httpServletRequest.getProtocol() + ",
requestURL = "
- + httpServletRequest.getRequestURL() + ",
contentType = "
- + httpServletRequest.getContentType() + ",
contentLength = "
- + httpServletRequest.getContentLength() + ",
contextPath = "
- + httpServletRequest.getContextPath() + ",
pathInfo = "
- + httpServletRequest.getPathInfo() + ",
requestURI = "
- + httpServletRequest.getRequestURI() + ",
servletPath = "
- + httpServletRequest.getServletPath() + ",
pathTranslated = "
- + httpServletRequest.getPathTranslated() + "]";
+ return "[method = " + httpServletRequest.getMethod() + ",
protocol = " +
+ httpServletRequest.getProtocol() + ",
requestURL = " +
+ httpServletRequest.getRequestURL() + ",
contentType = " +
+ httpServletRequest.getContentType() + ",
contentLength = " +
+ httpServletRequest.getContentLength() + ",
contextPath = " +
+ httpServletRequest.getContextPath() + ",
pathInfo = " +
+ httpServletRequest.getPathInfo() + ",
requestURI = " +
+ httpServletRequest.getRequestURI() + ",
servletPath = " +
+ httpServletRequest.getServletPath() + ",
pathTranslated = " +
+ httpServletRequest.getPathTranslated() + "]";
}
/**
@@ -454,11 +464,11 @@
depthRelativeToWicketHandler = -1;
relativePathPrefixToContextRoot = null;
relativePathPrefixToWicketHandler = null;
-
+
if (wicketRedirectUrl != null)
{
- this.previousUrlDepth =
getRequestParameters().getUrlDepth();
-
+ previousUrlDepth = getRequestParameters().getUrlDepth();
+
getRequestParameters().setUrlDepth(getDepthRelativeToWicketHandler());
}
else