Author: ivaynberg
Date: Sun Feb 1 17:48:52 2009
New Revision: 739797
URL: http://svn.apache.org/viewvc?rev=739797&view=rev
Log:
WICKET-1864
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java?rev=739797&r1=739796&r2=739797&view=diff
==============================================================================
---
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
(original)
+++
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
Sun Feb 1 17:48:52 2009
@@ -1339,7 +1339,11 @@
// We need to absolutize the redirect URL as we are not as
smart as a web-browser
// (WICKET-702)
- url = getContextPath() + getServletPath() + "/" + redirect;
+ url = redirect;
+ if (url.charAt(0) != '/')
+ {
+ url = getContextPath() + getServletPath() + "/" +
redirect;
+ }
// Remove occurrences of ".." from the path
url = RequestUtils.removeDoubleDots(url);