You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2004/07/10 22:01:33 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java

markt       2004/07/10 13:01:33

  Modified:    catalina/src/share/org/apache/catalina/servlets
                        DefaultServlet.java
  Log:
  Fix bug 27293. If-Unmodified-Since now takes account of HTTP header not including milliseconds
   - Port of Remy's patch in TC5.
  
  Revision  Changes    Path
  1.62      +5 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- DefaultServlet.java	8 May 2004 22:30:13 -0000	1.61
  +++ DefaultServlet.java	10 Jul 2004 20:01:33 -0000	1.62
  @@ -1715,7 +1715,7 @@
               long lastModified = resourceInfo.date;
               long headerValue = request.getDateHeader("If-Unmodified-Since");
               if (headerValue != -1) {
  -                if ( lastModified > headerValue ) {
  +                if ( lastModified > (headerValue + 1000)) {
                       // The entity has not been modified since the date
                       // specified by the client. This is not an error case.
                       response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
  
  
  

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