]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1889341 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Tue, 11 May 2021 15:21:43 +0000 (15:21 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 11 May 2021 15:21:43 +0000 (15:21 +0000)
* 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

CHANGES
STATUS
modules/http/http_filters.c

diff --git a/CHANGES b/CHANGES
index a800f83ddd4cf141d89ee0d3315acccd27e200cf..e5aaf2f1851fae5bdf51207969d64035624affbc 100644 (file)
--- 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 <ahshenbingyu gmail.com>]
 
diff --git a/STATUS b/STATUS
index 22f9946aaa6e46c9686d13e9564db121800e421e..51d4b75dfe28c7ae235ebb84883e09f6a8b13e8c 100644 (file)
--- 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
index 819b2718ce906dfcdbadb96c470cf35397bf4389..b10d2b71f26905959c1569ba6bd2ca9a3e7662e8 100644 (file)
@@ -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);