]> granicus.if.org Git - apache/commitdiff
Fix case where an included file may change but the shtml file has not -
authorJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 19 Sep 2001 06:20:32 +0000 (06:20 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 19 Sep 2001 06:20:32 +0000 (06:20 +0000)
since we returned Last-Modified/ETag headers, we said that it was possibly
cacheable.  Wrong.

See RFC 2616 13.3.4 for more details (these are SHOULD/MAY clauses, so I
think we can discard them when we are dealing with dynamic data).

(Justin cleaned up the comment to cite RFC 2616.)

Submitted by: Ian Holsman <ianh@cnet.com>
Reviewed by: Justin Erenkrantz, Aaron Bannert, Brian Pane

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

CHANGES
modules/filters/mod_include.c

diff --git a/CHANGES b/CHANGES
index 621f0f9f47cac2a69c5ea9f74af1d17a8852d562..4089a46f7943e57b85c43af0d3461528245be746 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.26-dev
 
+  *) Fix mod_include to not return ETag or Last-Modified headers.
+     [Ian Holsman <ianh@cnet.com>]
+
   *) Fix worker MPM's scoreboard logic.  [Aaron Bannert <aaron@clove.org>]
 
   *) Eliminate the wasteful run-time conversion of method names from strings 
index e949ff2f7c00c2664eb35ceb34bf6ad354192710..72532fa1520f10882aa0fbaefc450d079e655d0b 100644 (file)
@@ -3082,6 +3082,14 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
      */
     apr_table_unset(f->r->headers_out, "Content-Length");
 
+    /* Always unset the ETag/Last-Modified fields - see RFC2616 - 13.3.4.
+     * We don't know if we are going to be include a virtual file (think
+     * exec) which may make the content completely dynamic or change the
+     * Last-Modified header.  Therefore, we can't support these headers.
+     */
+    apr_table_unset(f->r->headers_out, "ETag");
+    apr_table_unset(f->r->headers_out, "Last-Modified");
+
     rv = send_parsed_content(&b, r, f);
 
     if (parent) {