From: Eric Covener Date: Wed, 10 Jan 2018 00:52:25 +0000 (+0000) Subject: PR 61983: "Header unset Content-Type" doesn't work X-Git-Tag: 2.5.0-alpha2-ci-test-only~2988 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c9d4f4d4b7b2e5d98c2c6a5cc89803b09324137;p=thirdparty%2Fapache%2Fhttpd.git PR 61983: "Header unset Content-Type" doesn't work Submitted By: Hank Ibell Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1820715 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 5a5b05c7097..ddc1178f11f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.1 + *) mod_headers: Allow 'Header unset Content-Type' to remove the Content-Type + header. PR 61983. [Hank Ibell ] *) mod_md v1.1.8: new configuration directive "MDBaseServer on|off" to allow/inhibit management of the base server domains outside VirtualHosts. By default, this is "off", diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index 4b4c606886c..102b3ff794f 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -806,6 +806,9 @@ static int do_headers_fixup(request_rec *r, apr_table_t *headers, break; case hdr_unset: apr_table_unset(headers, hdr->header); + if (!ap_cstr_casecmp(hdr->header, "Content-Type")) { + ap_set_content_type(r, NULL); + } break; case hdr_echo: v.r = r;