]> granicus.if.org Git - apache/commitdiff
This fixes the cache code so that responses can be cached if they have
authorPaul J. Reder <rederpj@apache.org>
Fri, 12 Sep 2003 19:28:47 +0000 (19:28 +0000)
committerPaul J. Reder <rederpj@apache.org>
Fri, 12 Sep 2003 19:28:47 +0000 (19:28 +0000)
 an Expires header but no Etag or Last-Modified headers. PR 23130.
 Submitted by: <bjorn@exoweb.net>
 Reviewed by: Paul J. Reder

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101231 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/experimental/mod_cache.c

diff --git a/CHANGES b/CHANGES
index 3324821d42f7e8bf13806410a7014f2c961aecb6..90f9a3c3a53d4045b91da2f43638d47c7cf952d4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,12 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) This fixes the cache code so that responses can be cached
+     if they have an Expires header but no Etag or Last-Modified
+     headers. PR 23130.
+     [Submitted by: <bjorn@exoweb.net>]
+     [Reviewed by: Paul J. Reder]
+
   *) Fix a couple of AIX xlc_r compiler issues in the code I just
      committed. [Paul J. Reder]
 
index 6a7d0004af7c0f1067cf9a3d7a4f0432d386c0cd..95929628a9091eca4fecdfcb997e17c67694f4b3 100644 (file)
@@ -565,14 +565,14 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
         reason = "HTTP Status 304 Not Modified";
     }
     else if (r->status == HTTP_OK && lastmods == NULL && etag == NULL 
-             && (conf->no_last_mod_ignore ==0)) {
-        /* 200 OK response from HTTP/1.0 and up without a Last-Modified
-         * header/Etag 
+             && (exps == NULL) && (conf->no_last_mod_ignore ==0)) {
+        /* 200 OK response from HTTP/1.0 and up without Last-Modified,
+         * Etag, or Expires headers.
          */
-        /* XXX mod-include clears last_modified/expires/etags - this
+        /* Note: mod-include clears last_modified/expires/etags - this
          * is why we have an optional function for a key-gen ;-) 
          */
-        reason = "No Last-Modified or Etag header";
+        reason = "No Last-Modified, Etag, or Expires headers";
     }
     else if (r->header_only) {
         /* HEAD requests */
@@ -760,7 +760,6 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
     info->request_time = r->request_time;
 
     /* check last-modified date */
-    /* XXX FIXME we're referencing date on a path where we didn't set it */
     if (lastmod != APR_DATE_BAD && lastmod > date) {
         /* if it's in the future, then replace by date */
         lastmod = date;