tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r440328 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina: Globals.java core/StandardHostValve.java session/StandardSession.java
Date Tue, 05 Sep 2006 11:56:01 GMT
Author: remm
Date: Tue Sep  5 04:55:59 2006
New Revision: 440328

URL: http://svn.apache.org/viewvc?view=rev&rev=440328
Log:
- Add a master flag for compliance issues, for ease of use.
- Add back session access on all requests.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java?view=diff&rev=440328&r1=440327&r2=440328
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java Tue Sep  5 04:55:59 2006
@@ -321,4 +321,12 @@
         "javax.servlet.context.tempdir";
 
 
+    /**
+     * The master flag which controls strict servlet specification 
+     * compliance.
+     */
+    public static final boolean STRICT_SERVLET_COMPLIANCE =
+        Boolean.valueOf(System.getProperty("org.apache.catalina.STRICT_SERVLET_COMPLIANCE",
"false")).booleanValue();
+
+
 }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java?view=diff&rev=440328&r1=440327&r2=440328
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java Tue Sep  5 04:55:59
2006
@@ -125,6 +125,12 @@
         // Ask this Context to process this request
         context.getPipeline().getFirst().invoke(request, response);
 
+        // Access a session (if present) to update last accessed time, based on a
+        // strict interpretation of the specification
+        if (Globals.STRICT_SERVLET_COMPLIANCE) {
+            request.getSession(false);
+        }
+
         // Error page processing
         response.setSuspended(false);
 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java?view=diff&rev=440328&r1=440327&r2=440328
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java Tue Sep  5
04:55:59 2006
@@ -84,7 +84,8 @@
 
 
     protected static final boolean ACTIVITY_CHECK = 
-        Boolean.valueOf(System.getProperty("org.apache.catalina.session.StandardSession.ACTIVITY_CHECK",
"false")).booleanValue();
+        Globals.STRICT_SERVLET_COMPLIANCE
+        || Boolean.valueOf(System.getProperty("org.apache.catalina.session.StandardSession.ACTIVITY_CHECK",
"false")).booleanValue();
 
 
     // ----------------------------------------------------------- Constructors



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


Mime
View raw message