tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r543679 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java webapps/docs/changelog.xml
Date Sat, 02 Jun 2007 00:42:20 GMT
Author: markt
Date: Fri Jun  1 17:42:19 2007
New Revision: 543679

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

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java?view=diff&rev=543679&r1=543678&r2=543679
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
Fri Jun  1 17:42:19 2007
@@ -1653,6 +1653,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;
                 }
             }
@@ -1709,6 +1711,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/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=543679&r1=543678&r2=543679
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Fri Jun  1 17:42:19 2007
@@ -84,6 +84,10 @@
          (markt)
       </fix>
       <fix>
+         <bug>42497</bug>: Ensure ETag header is present in a 304 response.
+         Patch provided by Len Popp. (markt)
+      </fix>
+      <fix>
          Allow for a forward/include to call getAttributeNames on the Request in a sandbox.
(billbarker)
       </fix>
     </changelog>



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


Mime
View raw message