From: André Malo Date: Sun, 2 Nov 2003 22:09:19 +0000 (+0000) Subject: no longer allow an ETag header in 304 responses. X-Git-Tag: pre_ajp_proxy~1070 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2578a599c950f6ba4b36578272ee7d75571b52c4;p=thirdparty%2Fapache%2Fhttpd.git no longer allow an ETag header in 304 responses. PR: 19355 Submitted by: Geoffrey Young git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101687 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 412b843bfc8..cc0a9c19efa 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) mod_include no longer allows an ETag header on 304 responses. + PR 19355. [Geoffrey Young , André Malo] + *) mod_autoindex: Add 'XHTML' option in order to allow switching between HTML 3.2 and XHTML 1.0 output. PR 23747. [André Malo] diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 61706956070..3f4b416e57f 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -3580,6 +3580,12 @@ static int includes_setup(ap_filter_t *f) f->r->no_local_copy = 1; } + /* Don't allow ETag headers to be generated - see RFC2616 - 13.3.4. + * We don't know if we are going to be including a file or executing + * a program - in either case a strong ETag header will likely be invalid. + */ + apr_table_setn(f->r->notes, "no-etag", ""); + return OK; } @@ -3657,14 +3663,13 @@ 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. + /* Always unset the Last-Modified field - see RFC2616 - 13.3.4. * We don't know if we are going to be including a file or executing * a program which may change the Last-Modified header or make the * content completely dynamic. Therefore, we can't support these * headers. * Exception: XBitHack full means we *should* set the Last-Modified field. */ - apr_table_unset(f->r->headers_out, "ETag"); /* Assure the platform supports Group protections */ if ((conf->xbithack == XBITHACK_FULL)