]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Do not strip any headers from 304 responses.
authorRuediger Pluem <rpluem@apache.org>
Fri, 30 Apr 2021 20:08:46 +0000 (20:08 +0000)
committerRuediger Pluem <rpluem@apache.org>
Fri, 30 Apr 2021 20:08:46 +0000 (20:08 +0000)
PR: 61820

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1889341 13f79535-47bb-0310-9956-ffa450edef68

changes-entries/fix_pr61820_regression.txt [new file with mode: 0644]
modules/http/http_filters.c

diff --git a/changes-entries/fix_pr61820_regression.txt b/changes-entries/fix_pr61820_regression.txt
new file mode 100644 (file)
index 0000000..c1ce8e5
--- /dev/null
@@ -0,0 +1,2 @@
+  *) core: Fix a regression that stripped the ETag header from 304 responses.
+     PR 61820 [Ruediger Pluem, Roy T. Fielding]
index 482a3f97de0b92b761eee297f734d345c40d28a8..289ba49abed1ac0a7ae063bfb6d9222113eb2235 100644 (file)
@@ -1433,21 +1433,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);