httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r709912 - /httpd/test/framework/trunk/t/modules/expires.t
Date Sun, 02 Nov 2008 19:34:07 GMT
Author: rpluem
Date: Sun Nov  2 11:34:06 2008
New Revision: 709912

URL: http://svn.apache.org/viewvc?rev=709912&view=rev
Log:
* Expiration dates should not be in the past. To indicate an already expired
  document, the expiration date should equal to the access date.

Modified:
    httpd/test/framework/trunk/t/modules/expires.t

Modified: httpd/test/framework/trunk/t/modules/expires.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/expires.t?rev=709912&r1=709911&r2=709912&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/expires.t (original)
+++ httpd/test/framework/trunk/t/modules/expires.t Sun Nov  2 11:34:06 2008
@@ -231,6 +231,13 @@
     if ($exp_conf =~ /^([A|M])(\d+)$/) {
         $exp_type = $1;
         $expected = $2;
+        ## With modification date as base expire times can be in the past
+        ## Correct behaviour for the server in this case is to set expires
+        ## time equal to access time.
+        if (($exp_type eq 'M')
+            && ($headers{access} > $headers{modified} + $expected)) {
+            $expected = $headers{access} - $headers{modified};
+        }
     } else {
         print STDERR "\n\ndoom: $exp_conf\n\n";
         return 0;



Mime
View raw message