From: André Malo Date: Fri, 21 Nov 2003 23:38:23 +0000 (+0000) Subject: no longer allow an ETag header in 304 responses. X-Git-Tag: 2.0.49~357 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a9619feb53554225ecf887a09be719d4fdbdf14;p=thirdparty%2Fapache%2Fhttpd.git no longer allow an ETag header in 304 responses. PR: 19355 Submitted by: Geoffrey Young Reviewed by: Jeff Trawick, Thom May git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@101840 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index fff2770686d..ce055986e72 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.49 + *) mod_include no longer allows an ETag header on 304 responses. + PR 19355. [Geoffrey Young , André Malo] + *) EBCDIC: Convert header fields to ASCII before sending (broken since 2.0.44). [Martin Kraemer] diff --git a/STATUS b/STATUS index c57e703a21c..7bec54ca6b2 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2003/11/21 23:25:37 $] +Last modified at [$Date: 2003/11/21 23:38:22 $] Release: @@ -343,10 +343,6 @@ PATCHES TO BACKPORT FROM 2.1 include/ap_mmn.h: r1.60 +1: nd - * mod_include: Don't allow ETag to be sent in 304. PR 19355. - modules/filters/mod_include.c: r1.290 - +1: nd, trawick, thommay - * mod_autoindex: Restore the ability to add a description for directories that don't contain an index file. PR 7990 diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index a50418e76bb..092badd24ee 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -3335,7 +3335,13 @@ static int includes_setup(ap_filter_t *f) || !(f->r->finfo.protection & APR_GEXECUTE)) { 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; } @@ -3405,14 +3411,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)