From: Ruediger Pluem Date: Tue, 11 May 2021 15:21:43 +0000 (+0000) Subject: Merge r1889341 from trunk: X-Git-Tag: 2.4.48~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf463edd81af368b6e22d835ea7011825d03b98a;p=thirdparty%2Fapache%2Fhttpd.git Merge r1889341 from trunk: * Do not strip any headers from 304 responses. PR: 61820 Reviewed by: rpluem, covener, ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1889764 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index a800f83ddd4..e5aaf2f1851 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,9 @@ Changes with Apache 2.4.48 Changes with Apache 2.4.47 + *) core: Fix a regression that stripped the ETag header from 304 responses. + PR 61820 [Ruediger Pluem, Roy T. Fielding] + *) mod_dav_fs: Improve logging output when failing to open files for writing. PR 64413. [Bingyu Shen ] diff --git a/STATUS b/STATUS index 22f9946aaa6..51d4b75dfe2 100644 --- a/STATUS +++ b/STATUS @@ -146,15 +146,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.4.x patch: svn merge -c 1888266 ^/httpd/httpd/trunk . +1: ylavic, icing, rpluem - *) core: Fix a regression that stripped the ETag header from 304 responses. - PR 61820 - Trunk version of patch: - https://svn.apache.org/r1889341 - Backport version for 2.4.x of patch: - Trunk version of patch works - svn merge -c 1889341 ^/httpd/httpd/trunk . - +1: rpluem, covener, ylavic - *) core/mod_ssl/mod_md: - adding new ap_ssl_*() functions for a backward compatible replacement of the major optional mod_ssl functions. This diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 819b2718ce9..b10d2b71f26 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -1501,21 +1501,6 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, h.pool = r->pool; h.bb = b2; - if (r->status == HTTP_NOT_MODIFIED) { - /* - * List of headers that must not be updated on a 304 (or 206 partial content) - * https://tools.ietf.org/id/draft-ietf-httpbis-cache-08.txt - */ - apr_table_unset(r->headers_out, "Content-Encoding"); - apr_table_unset(r->headers_out, "Content-Length"); - apr_table_unset(r->headers_out, "Content-MD5"); - apr_table_unset(r->headers_out, "Content-Range"); - apr_table_unset(r->headers_out, "ETag"); - apr_table_unset(r->headers_out, "TE"); - apr_table_unset(r->headers_out, "Trailer"); - apr_table_unset(r->headers_out, "Transfer-Encoding"); - apr_table_unset(r->headers_out, "Upgrade"); - } send_all_header_fields(&h, r); terminate_header(b2);