tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r932926 - /tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
Date Sun, 11 Apr 2010 15:53:07 GMT
Author: rjung
Date: Sun Apr 11 15:53:07 2010
New Revision: 932926

URL: http://svn.apache.org/viewvc?rev=932926&view=rev
Log:
Ignore request handling time in session lastAccessedTime
when acting servlet spec compliant.

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=932926&r1=932925&r2=932926&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Sun Apr 11 15:53:07
2010
@@ -643,8 +643,18 @@ public class StandardSession
     public void endAccess() {
 
         isNew = false;
-        this.thisAccessedTime = System.currentTimeMillis();
-        this.lastAccessedTime = this.thisAccessedTime;
+
+        /**
+         * The servlet spec mandates to ignore request handling time
+         * in lastAccessedTime.
+         */
+        if (Globals.STRICT_SERVLET_COMPLIANCE) {
+            this.lastAccessedTime = this.thisAccessedTime;
+            this.thisAccessedTime = System.currentTimeMillis();
+        } else {
+            this.thisAccessedTime = System.currentTimeMillis();
+            this.lastAccessedTime = this.thisAccessedTime;
+        }
 
         if (ACTIVITY_CHECK) {
             accessCount.decrementAndGet();



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


Mime
View raw message