You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2009/02/22 22:54:37 UTC

svn commit: r746830 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.java

Author: ivaynberg
Date: Sun Feb 22 21:54:37 2009
New Revision: 746830

URL: http://svn.apache.org/viewvc?rev=746830&view=rev
Log:
WICKET-2100

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

Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.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/WebSession.java?rev=746830&r1=746829&r2=746830&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.java (original)
+++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.java Sun Feb 22 21:54:37 2009
@@ -18,6 +18,7 @@
 
 import org.apache.wicket.Application;
 import org.apache.wicket.Component;
+import org.apache.wicket.IResourceListener;
 import org.apache.wicket.Request;
 import org.apache.wicket.RequestCycle;
 import org.apache.wicket.Session;
@@ -109,6 +110,12 @@
 	{
 		WebRequest lockedRequest = (WebRequest)lockedRequestCycle.getRequest();
 
+		// if the request thats holding the lock is a resource request we allow this request
+		if (IResourceListener.INTERFACE.equals(lockedRequest.getRequestParameters().getInterface()))
+		{
+			return true;
+		}
+
 		// if the request that's holding the lock is ajax, we allow this request
 		if (lockedRequest.isAjax() == true)
 		{
@@ -125,9 +132,10 @@
 		}
 
 		String lockedPageId = Strings.firstPathComponent(lockedRequest.getRequestParameters()
-				.getComponentPath(), Component.PATH_SEPARATOR);
+			.getComponentPath(), Component.PATH_SEPARATOR);
 		String currentPageId = Strings.firstPathComponent(currentRequestCycle.getRequest()
-				.getRequestParameters().getComponentPath(), Component.PATH_SEPARATOR);
+			.getRequestParameters()
+			.getComponentPath(), Component.PATH_SEPARATOR);
 
 		int lockedVersion = lockedRequest.getRequestParameters().getVersionNumber();
 		int currentVersion = currentRequest.getRequestParameters().getVersionNumber();
@@ -152,8 +160,8 @@
 		// used, when we're doing the render request (isRedirect should return
 		// false in that case)
 		if (Application.get().getRequestCycleSettings().getRenderStrategy() != IRequestCycleSettings.REDIRECT_TO_RENDER ||
-				((WebRequest)RequestCycle.get().getRequest()).isAjax() ||
-				(!RequestCycle.get().isRedirect()))
+			((WebRequest)RequestCycle.get().getRequest()).isAjax() ||
+			(!RequestCycle.get().isRedirect()))
 		{
 			// If session scoped, rendered messages got indeed cleaned up, mark
 			// the session as dirty