You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jc...@apache.org on 2008/03/09 16:33:14 UTC

svn commit: r635261 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/persistence/CookieValuePersister.java

Author: jcompagner
Date: Sun Mar  9 08:33:04 2008
New Revision: 635261

URL: http://svn.apache.org/viewvc?rev=635261&view=rev
Log:
see WICKET-1387
we just had setPath("/")
because previously we did getWebRequest().getContext())

But that method is gone now. But the problem is can we really do this:

			cookie.setPath(getWebRequest().getHttpServletRequest().getContextPath());

if we are behind a firewall?

Modified:
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/persistence/CookieValuePersister.java

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/persistence/CookieValuePersister.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/persistence/CookieValuePersister.java?rev=635261&r1=635260&r2=635261&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/persistence/CookieValuePersister.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/persistence/CookieValuePersister.java Sun Mar  9 08:33:04 2008
@@ -135,9 +135,8 @@
 	private String cookieToDebugString(final Cookie cookie)
 	{
 		return "[Cookie " + " name = " + cookie.getName() + ", value = " + cookie.getValue() +
-				", domain = " + cookie.getDomain() + ", path = " + cookie.getPath() +
-				", maxAge = " + Time.valueOf(cookie.getMaxAge()).toDateString() + "(" +
-				cookie.getMaxAge() + ")" + "]";
+			", domain = " + cookie.getDomain() + ", path = " + cookie.getPath() + ", maxAge = " +
+			Time.valueOf(cookie.getMaxAge()).toDateString() + "(" + cookie.getMaxAge() + ")" + "]";
 	}
 
 	/**
@@ -209,8 +208,10 @@
 	 */
 	private CookieValuePersisterSettings getSettings()
 	{
-		return RequestCycle.get().getApplication().getSecuritySettings()
-				.getCookieValuePersisterSettings();
+		return RequestCycle.get()
+			.getApplication()
+			.getSecuritySettings()
+			.getCookieValuePersisterSettings();
 	}
 
 	/**
@@ -260,7 +261,8 @@
 				cookie.setDomain(domain);
 			}
 
-			cookie.setPath("/");
+			cookie.setPath(getWebRequest().getHttpServletRequest().getContextPath());
+			// cookie.setPath("/");
 			// cookie.setPath(getWebRequest().getContextPath());
 
 			cookie.setVersion(getSettings().getVersion());