You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jr...@apache.org on 2010/12/17 00:41:46 UTC
svn commit: r1050230 -
/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
Author: jrthomerson
Date: Thu Dec 16 23:41:46 2010
New Revision: 1050230
URL: http://svn.apache.org/viewvc?rev=1050230&view=rev
Log:
fixes WICKET-3259 for wicket-1.4.x branch
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=1050230&r1=1050229&r2=1050230&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 Thu Dec 16 23:41:46 2010
@@ -314,7 +314,8 @@ public class ServletWebRequest extends W
{
// If this is an error page, this will be /mount or /?wicket:foo
relativeUrl = forwardUrl.substring(1);
- relativeUrl = relativeUrl.substring(filterPath.length());
+ relativeUrl = filterPath == null ? relativeUrl
+ : relativeUrl.substring(filterPath.length());
}
else if (!Strings.isEmpty(errorUrl))
{
@@ -322,7 +323,8 @@ public class ServletWebRequest extends W
errorUrl = errorUrl.substring(httpRequest.getContextPath().length());
// strip the leading slash
relativeUrl = errorUrl.substring(1);
- relativeUrl = relativeUrl.substring(filterPath.length());
+ relativeUrl = filterPath == null ? relativeUrl
+ : relativeUrl.substring(filterPath.length());
}
else if (wicketRedirectUrl != null)
{