You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2010/08/27 02:13:57 UTC

svn commit: r989985 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java

Author: ivaynberg
Date: Fri Aug 27 00:13:57 2010
New Revision: 989985

URL: http://svn.apache.org/viewvc?rev=989985&view=rev
Log:

Issue: WICKET-2712

Modified:
    wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java

Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java?rev=989985&r1=989984&r2=989985&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java (original)
+++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java Fri Aug 27 00:13:57 2010
@@ -316,24 +316,8 @@ public class ServletWebRequest extends W
 		{
 			// Strip off context path from front of URI.
 			errorUrl = errorUrl.substring(httpRequest.getContextPath().length());
-
-			String servletPath = httpRequest.getServletPath();
-			if (!errorUrl.startsWith(servletPath))
-			{
-				prepender.prepend(servletPath.substring(1) + "/");
-			}
-			for (int i = servletPath.length() + 1; i < errorUrl.length(); i++)
-			{
-				if (errorUrl.charAt(i) == '?')
-				{
-					break;
-				}
-				if (errorUrl.charAt(i) == '/')
-				{
-					prepender.prepend("../");
-				}
-			}
-			return relativePathPrefixToWicketHandler = prepender.toString();
+			// strip the leading slash
+			relativeUrl = errorUrl.substring(1);
 		}
 		else if (wicketRedirectUrl != null)
 		{