]> granicus.if.org Git - apache/commitdiff
PR 61983: "Header unset Content-Type" doesn't work
authorEric Covener <covener@apache.org>
Wed, 10 Jan 2018 00:52:25 +0000 (00:52 +0000)
committerEric Covener <covener@apache.org>
Wed, 10 Jan 2018 00:52:25 +0000 (00:52 +0000)
Submitted By: Hank Ibell <hwibell gmail.com>
Committed By: covener

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

CHANGES
modules/metadata/mod_headers.c

diff --git a/CHANGES b/CHANGES
index 5a5b05c7097d923e7a2184787ba40938e70b4e7c..ddc1178f11fd8f7416e357046ab25e0d1471a302 100644 (file)
--- 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 <hwibell gmail.com>]
 
   *) 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", 
index 4b4c606886c985f5a1f25c804908b3867a4d4cf3..102b3ff794f7237d07435c0d46d312c4a59d7771 100644 (file)
@@ -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;