]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_h2: Don't strip headers from 304 responses.
authorYann Ylavic <ylavic@apache.org>
Mon, 7 Jun 2021 15:06:06 +0000 (15:06 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 7 Jun 2021 15:06:06 +0000 (15:06 +0000)
h2 equivalent of r1889341 for h1.

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

changes-entries/h2_dont_strip_304.txt [new file with mode: 0644]
modules/http2/h2_from_h1.c

diff --git a/changes-entries/h2_dont_strip_304.txt b/changes-entries/h2_dont_strip_304.txt
new file mode 100644 (file)
index 0000000..e1e8355
--- /dev/null
@@ -0,0 +1,2 @@
+  *) mod_h2: Don't strip headers from 304 responses.  [Yann Ylavic]
+
index 0072ef1e653008547abd1c9d76153fce8a130ca3..ff37d173d47f66fc14d2355a305b95cd887800bc 100644 (file)
@@ -280,25 +280,8 @@ static h2_headers *create_response(h2_task *task, request_rec *r)
     }
     
     headers = apr_table_make(r->pool, 10);
-    
     set_basic_http_header(headers, r, r->pool);
-    if (r->status == HTTP_NOT_MODIFIED) {
-        apr_table_do(copy_header, headers, r->headers_out,
-                     "ETag",
-                     "Content-Location",
-                     "Expires",
-                     "Cache-Control",
-                     "Vary",
-                     "Warning",
-                     "WWW-Authenticate",
-                     "Proxy-Authenticate",
-                     "Set-Cookie",
-                     "Set-Cookie2",
-                     NULL);
-    }
-    else {
-        apr_table_do(copy_header, headers, r->headers_out, NULL);
-    }
+    apr_table_do(copy_header, headers, r->headers_out, NULL);
     
     return h2_headers_rcreate(r, r->status, headers, r->pool);
 }