Author: jcompagner
Date: Wed Feb 18 12:30:56 2009
New Revision: 745496

URL: http://svn.apache.org/viewvc?rev=745496&view=rev
Log:
urls are not set correctly and given back correctly

Modified:
    
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java?rev=745496&r1=745495&r2=745496&view=diff
==============================================================================
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
 Wed Feb 18 12:30:56 2009
@@ -804,6 +804,14 @@
                {
                        return getContextPath() + getServletPath();
                }
+               else
+               {
+                       int index = url.indexOf("?");
+                       if (index != -1)
+                       {
+                               return url.substring(0, index);
+                       }
+               }
                return url;
        }
 
@@ -1130,6 +1138,10 @@
                        int index = url.indexOf("/", 7);
                        url = url.substring(index);
                }
+               if (!url.startsWith("/"))
+               {
+                       url = getContextPath() + getServletPath() + "/" + url;
+               }
                this.url = url;
                if (url.startsWith(getContextPath()))
                {


Reply via email to