httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1004974 - in /httpd/httpd/branches/2.0.x: STATUS modules/metadata/mod_expires.c
Date Wed, 06 Oct 2010 10:35:12 GMT
Author: fuankg
Date: Wed Oct  6 10:35:12 2010
New Revision: 1004974

URL: http://svn.apache.org/viewvc?rev=1004974&view=rev
Log:
Fixed mod_expires: Expires time shouldn't be in the past.
r1002205 in test framework needs to be reverted now since this is fixed.
Author: rjung, reviewed by: wrowe, sf.

Modified:
    httpd/httpd/branches/2.0.x/STATUS
    httpd/httpd/branches/2.0.x/modules/metadata/mod_expires.c

Modified: httpd/httpd/branches/2.0.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/STATUS?rev=1004974&r1=1004973&r2=1004974&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/STATUS (original)
+++ httpd/httpd/branches/2.0.x/STATUS Wed Oct  6 10:35:12 2010
@@ -132,13 +132,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * mod_expires: Expires time shouldn't be in the past
-    Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=708902
-    2.2.x patch: http://svn.apache.org/viewvc?view=revision&revision=713142
-    Backport: http://people.apache.org/~rjung/patches/expires-in-the-past-2_0.patch
-    Revert r1002205 in test framework, once this is fixed.
-    +1: rjung, wrowe, sf
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ please place SVN revisions from trunk here, so it is easy to
     identify exactly what the proposed changes are!  Add all new

Modified: httpd/httpd/branches/2.0.x/modules/metadata/mod_expires.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/modules/metadata/mod_expires.c?rev=1004974&r1=1004973&r2=1004974&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/modules/metadata/mod_expires.c (original)
+++ httpd/httpd/branches/2.0.x/modules/metadata/mod_expires.c Wed Oct  6 10:35:12 2010
@@ -427,6 +427,9 @@ static int set_expiration_fields(request
     }
 
     expires = base + additional;
+    if (expires < r->request_time) {
+        expires = r->request_time;
+    }
     apr_table_mergen(t, "Cache-Control",
                      apr_psprintf(r->pool, "max-age=%" APR_TIME_T_FMT,
                                   apr_time_sec(expires - r->request_time)));



Mime
View raw message