tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r932989 - /tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
Date Sun, 11 Apr 2010 20:51:16 GMT
Author: rjung
Date: Sun Apr 11 20:51:16 2010
New Revision: 932989

URL: http://svn.apache.org/viewvc?rev=932989&view=rev
Log:
Use spec compliant session expiration in STRICT_SERVLET_COMPLIANCE mode.

Modified:
    tomcat/trunk/java/org/apache/catalina/session/StandardSession.java

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=932989&r1=932988&r2=932989&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Sun Apr 11 20:51:16
2010
@@ -598,7 +598,12 @@ public class StandardSession
 
         if (maxInactiveInterval >= 0) { 
             long timeNow = System.currentTimeMillis();
-            int timeIdle = (int) ((timeNow - thisAccessedTime) / 1000L);
+            int timeIdle;
+            if (Globals.STRICT_SERVLET_COMPLIANCE) {
+                timeIdle = (int) ((timeNow - lastAccessedTime) / 1000L);
+            } else {
+                timeIdle = (int) ((timeNow - thisAccessedTime) / 1000L);
+            }
             if (timeIdle >= maxInactiveInterval) {
                 expire(true);
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message