From: Yann Ylavic Date: Mon, 7 Jun 2021 15:06:06 +0000 (+0000) Subject: mod_h2: Don't strip headers from 304 responses. X-Git-Tag: 2.5.0-alpha2-ci-test-only~924 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acd6d0126718688c16fb093ea40efd2297997c78;p=thirdparty%2Fapache%2Fhttpd.git mod_h2: Don't strip headers from 304 responses. h2 equivalent of r1889341 for h1. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1890563 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/h2_dont_strip_304.txt b/changes-entries/h2_dont_strip_304.txt new file mode 100644 index 00000000000..e1e8355a4dd --- /dev/null +++ b/changes-entries/h2_dont_strip_304.txt @@ -0,0 +1,2 @@ + *) mod_h2: Don't strip headers from 304 responses. [Yann Ylavic] + diff --git a/modules/http2/h2_from_h1.c b/modules/http2/h2_from_h1.c index 0072ef1e653..ff37d173d47 100644 --- a/modules/http2/h2_from_h1.c +++ b/modules/http2/h2_from_h1.c @@ -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); }