Commit db3bbb33 authored by Justin Erenkrantz's avatar Justin Erenkrantz
Browse files

Fix case where an included file may change but the shtml file has not -

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
parent 1b15d486
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
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 
+8 −0
Original line number Diff line number Diff line
@@ -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) {