tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r543680 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/servlets/DefaultServlet.java webapps/docs/changelog.xml
Date Sat, 02 Jun 2007 00:42:37 GMT
Author: markt
Date: Fri Jun  1 17:42:36 2007
New Revision: 543680

URL: http://svn.apache.org/viewvc?view=rev&rev=543680
Log:
Port fix for bug 42497. Include ETag header on 304 response as per RFC2616. Patch provided
by Len Popp.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?view=diff&rev=543680&r1=543679&r2=543680
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Fri Jun  1
17:42:36 2007
@@ -1014,7 +1014,7 @@
 
         // Vector which will contain all the ranges which are successfully
         // parsed.
-        ArrayList result = new ArrayList();
+        ArrayList<Range> result = new ArrayList<Range>();
         StringTokenizer commaTokenizer = new StringTokenizer(rangeHeader, ",");
 
         // Parsing the range list
@@ -1571,6 +1571,8 @@
                     // The entity has not been modified since the date
                     // specified by the client. This is not an error case.
                     response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
+                    response.setHeader("ETag", getETag(resourceAttributes));
+
                     return false;
                 }
             }
@@ -1627,6 +1629,8 @@
                 if ( ("GET".equals(request.getMethod()))
                      || ("HEAD".equals(request.getMethod())) ) {
                     response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
+                    response.setHeader("ETag", getETag(resourceAttributes));
+
                     return false;
                 } else {
                     response.sendError

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=543680&r1=543679&r2=543680
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Jun  1 17:42:36 2007
@@ -18,13 +18,8 @@
   <subsection name="Catalina">
     <changelog>
       <fix>
-         <bug>42449</bug>:
-         JNDIRealm does not catch NullPointerException for Sun's
-         LDAP provider (See bug for details) (funkman)
-      </fix>
-      <fix>
-         <bug>42444</bug>: prevent NPE for AccessLogValve
-         Patch provided by Nils Hammar (funkman)
+         <bug>39875</bug>: Fix BPE in RealmBase.init(). Port of yoavs's fix from
+         Tomcat 5. (markt)
       </fix>
       <fix>
          <bug>42361</bug>: Handle multi-part forms when saving requests during
@@ -35,8 +30,17 @@
          (markt)
       </fix>
       <fix>
-         <bug>39875</bug>: Fix BPE in RealmBase.init(). Port of yoavs's fix from
-         Tomcat 5. (markt)
+         <bug>42444</bug>: prevent NPE for AccessLogValve
+         Patch provided by Nils Hammar (funkman)
+      </fix>
+      <fix>
+         <bug>42449</bug>:
+         JNDIRealm does not catch NullPointerException for Sun's
+         LDAP provider (See bug for details) (funkman)
+      </fix>
+      <fix>
+         <bug>42497</bug>: Ensure ETag header is present in a 304 response.
+         Patch provided by Len Popp. (markt)
       </fix>
     </changelog>
   </subsection>



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


Mime
View raw message