You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2010/01/17 11:08:21 UTC

svn commit: r900084 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java

Author: jdonnerstag
Date: Sun Jan 17 10:08:21 2010
New Revision: 900084

URL: http://svn.apache.org/viewvc?rev=900084&view=rev
Log:
fixed: CryptedUrlWebRequestCodingStrategy fails in form with method="get"
Issue: WICKET-2675

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

Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java?rev=900084&r1=900083&r2=900084&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java (original)
+++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java Sun Jan 17 10:08:21 2010
@@ -251,6 +251,11 @@
 	protected String decodeURL(final String url)
 	{
 		int startIndex = url.indexOf("?x=");
+		if (startIndex == -1)
+		{
+			startIndex = url.indexOf("&x=");
+		}
+
 		if (startIndex != -1)
 		{
 			try
@@ -446,6 +451,10 @@
 			int pos1 = url.indexOf("?x=");
 			if (pos1 == -1)
 			{
+				pos1 = url.indexOf("&x=");
+			}
+			if (pos1 == -1)
+			{
 				throw new WicketRuntimeException("Programming error: we should come here");
 			}
 			int pos2 = url.indexOf("&");