You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2013/02/04 22:22:49 UTC

svn commit: r1442369 - in /tomcat/tc6.0.x/branches/tomcat6-testing: ./ java/javax/servlet/http/ java/org/apache/catalina/authenticator/ java/org/apache/catalina/servlets/ java/org/apache/catalina/valves/ webapps/docs/

Author: kkolinko
Date: Mon Feb  4 21:22:48 2013
New Revision: 1442369

URL: http://svn.apache.org/viewvc?rev=1442369&view=rev
Log:
Catching up with tc6.0.x/trunk
Merged revisions 1417827-1420000 from tc6.0.x/trunk.
I am skipping r1417826.

Modified:
    tomcat/tc6.0.x/branches/tomcat6-testing/   (props changed)
    tomcat/tc6.0.x/branches/tomcat6-testing/STATUS.txt
    tomcat/tc6.0.x/branches/tomcat6-testing/java/javax/servlet/http/HttpServlet.java
    tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/authenticator/FormAuthenticator.java
    tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/servlets/CGIServlet.java
    tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/valves/ErrorReportValve.java
    tomcat/tc6.0.x/branches/tomcat6-testing/webapps/docs/changelog.xml

Propchange: tomcat/tc6.0.x/branches/tomcat6-testing/
------------------------------------------------------------------------------
  Merged /tomcat/tc6.0.x/trunk:r1417827-1420000

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/STATUS.txt?rev=1442369&r1=1442368&r2=1442369&view=diff
==============================================================================
--- tomcat/tc6.0.x/branches/tomcat6-testing/STATUS.txt (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/STATUS.txt Mon Feb  4 21:22:48 2013
@@ -79,13 +79,6 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kfujino, kkolinko
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54054
-  Do not share shell environment variables between multiple instances of the CGI
-  servlet.
-  http://svn.apache.org/viewvc?rev=1402644&view=rev
-  +1: markt, kkolinko, schultz
-  -1:
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54080
   "Comma related bug in org.apache.catalina.valves.RemoteIpValve"
   Documentation-only patch:
@@ -101,34 +94,6 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko
   -1:
 
-* In FormAuthenticator: If it is configured to change Session IDs,
-  do the change before displaying the login form.
-  http://svn.apache.org/viewvc?view=revision&revision=1408044
-  (r1408043 in trunk)
-  +1: kkolinko, kfujino, schultz
-  -1:
-
-* Introduce property "tomcat.output" that is used to specify location of
-  the build output directory. This simplifies build configuration when the
-  output directory is located outside of the source tree.
-  http://svn.apache.org/viewvc?view=revision&revision=1408376
-  +1: kkolinko, kfujino, schultz
-  -1:
-
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54087
-  Correctly handle (ignore) invalid If-Modified-Since
-  header rather than throwing an exception.
-  http://svn.apache.org/viewvc?view=revision&revision=1408254
-  (r1408248 in trunk, by markt)
-  +1: kkolinko, kfujino, schultz
-  -1:
-
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54220
-  ErrorReportValve invoked on non-error responses
-  http://svn.apache.org/viewvc?rev=1416537&view=rev (ErrorReportValve.java only)
-  +1: markt, kfujino, kkolinko, schultz
-  -1:
-
 
 PATCHES/ISSUES THAT ARE STALLED
 

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/java/javax/servlet/http/HttpServlet.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/java/javax/servlet/http/HttpServlet.java?rev=1442369&r1=1442368&r2=1442369&view=diff
==============================================================================
--- tomcat/tc6.0.x/branches/tomcat6-testing/java/javax/servlet/http/HttpServlet.java (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/java/javax/servlet/http/HttpServlet.java Mon Feb  4 21:22:48 2013
@@ -616,7 +616,13 @@ public abstract class HttpServlet extend
                 // to go through further expensive logic
                 doGet(req, resp);
             } else {
-                long ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE);
+                long ifModifiedSince;
+                try {
+                    ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE);
+                } catch (IllegalArgumentException iae) {
+                    // Invalid date header - proceed as if none was set
+                    ifModifiedSince = -1;
+                }
                 if (ifModifiedSince < (lastModified / 1000 * 1000)) {
                     // If the servlet mod time is later, call doGet()
                     // Round down to the nearest second for a proper compare

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/authenticator/FormAuthenticator.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/authenticator/FormAuthenticator.java?rev=1442369&r1=1442368&r2=1442369&view=diff
==============================================================================
--- tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/authenticator/FormAuthenticator.java (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/authenticator/FormAuthenticator.java Mon Feb  4 21:22:48 2013
@@ -31,6 +31,7 @@ import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.catalina.Globals;
+import org.apache.catalina.Manager;
 import org.apache.catalina.Realm;
 import org.apache.catalina.Session;
 import org.apache.catalina.connector.Request;
@@ -322,6 +323,15 @@ public class FormAuthenticator
                     config.getLoginPage(), context.getName()));
         }
 
+        if (getChangeSessionIdOnAuthentication()) {
+            Session session = request.getSessionInternal(false);
+            if (session != null) {
+                Manager manager = request.getContext().getManager();
+                manager.changeSessionId(session);
+                request.changeSessionId(session.getId());
+            }
+        }
+
         // Always use GET for the login page, regardless of the method used
         String oldMethod = request.getCoyoteRequest().method().toString();
         request.getCoyoteRequest().method().setString("GET");

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/servlets/CGIServlet.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/servlets/CGIServlet.java?rev=1442369&r1=1442368&r2=1442369&view=diff
==============================================================================
--- tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/servlets/CGIServlet.java (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/servlets/CGIServlet.java Mon Feb  4 21:22:48 2013
@@ -277,7 +277,7 @@ public final class CGIServlet extends Ht
     static Object expandFileLock = new Object();
 
     /** the shell environment variables to be passed to the CGI script */
-    static Hashtable<String,String> shellEnv = new Hashtable<String,String>();
+    Hashtable<String,String> shellEnv = new Hashtable<String,String>();
 
     /**
      * Sets instance variables.

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/valves/ErrorReportValve.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1442369&r1=1442368&r2=1442369&view=diff
==============================================================================
--- tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/valves/ErrorReportValve.java (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/java/org/apache/catalina/valves/ErrorReportValve.java Mon Feb  4 21:22:48 2013
@@ -156,8 +156,10 @@ public class ErrorReportValve
 
         // Do nothing on a 1xx, 2xx and 3xx status
         // Do nothing if anything has been written already
-        if ((statusCode < 400) || (response.getContentCount() > 0))
+        if (statusCode < 400 || response.getContentCount() > 0 ||
+                !response.isError()) {
             return;
+        }
 
         String message = RequestUtil.filter(response.getMessage());
         if (message == null) {

Modified: tomcat/tc6.0.x/branches/tomcat6-testing/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing/webapps/docs/changelog.xml?rev=1442369&r1=1442368&r2=1442369&view=diff
==============================================================================
--- tomcat/tc6.0.x/branches/tomcat6-testing/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/branches/tomcat6-testing/webapps/docs/changelog.xml Mon Feb  4 21:22:48 2013
@@ -44,6 +44,26 @@
  General, Catalina, Coyote, Jasper, Cluster, Web applications, Other
 -->
 <section name="Tomcat 6.0.37 (jfclere)">
+  <subsection name="Catalina">
+    <changelog>
+      <fix>
+        In FormAuthenticator: If it is configured to change Session IDs,
+        do the change before displaying the login form. (kkolinko)
+      </fix>
+      <fix>
+        <bug>54054</bug>: Do not share shell environment variables between
+        multiple instances of the CGI servlet. (markt)
+      </fix>
+      <fix>
+        <bug>54087</bug>: Correctly handle (ignore) invalid If-Modified-Since
+        header rather than throwing an exception. (markt/kkolinko)
+      </fix>
+      <fix>
+        <bug>54220</bug>: Ensure the ErrorReportValve only generates an error
+        report if the error flag on the response has been set. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Web applications">
     <changelog>
       <fix>
@@ -57,6 +77,16 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Other">
+    <changelog>
+      <update>
+        In the build configuration: introduce property "tomcat.output" that is
+        used to specify location of the build output directory. This simplifies
+        configuration if someone wants to move the <code>output</code> directory
+        elsewhere (e.g. out of the source tree). (kkolinko)
+      </update>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 6.0.36 (jfclere)" rtext="released 2012-10-19">
   <subsection name="Catalina">



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