]> granicus.if.org Git - apache/commitdiff
mod_headers: align Header Edit with Header Set on Content-Type
authorNick Kew <niq@apache.org>
Sat, 26 Dec 2009 23:05:39 +0000 (23:05 +0000)
committerNick Kew <niq@apache.org>
Sat, 26 Dec 2009 23:05:39 +0000 (23:05 +0000)
PR 48422
Adapted patch from Cyril Bonté

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

CHANGES
modules/metadata/mod_headers.c

diff --git a/CHANGES b/CHANGES
index a5fba36efc920c6905d108e0a891d49a1246743a..81e0854f8725bdbf1b60b3d6dd94d6ee11a63241 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -33,6 +33,9 @@ Changes with Apache 2.3.5
   *) Proxy: Fix ProxyPassReverse with relative URL
      Derived (slightly erroneously) from PR 38864 [Nick Kew]
 
+  *) mod_headers: align Header Edit with Header Set when used on Content-Type
+     PR 48422 [Cyril Bonté <cyril.bonte free.fr>, Nick Kew>]
+
 Changes with Apache 2.3.4
 
   *) Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
index 2554681042f2ee4d345152cedec3c8fe0317f46e..e27f504ae64e22d279183a618dee0af6571d7459 100644 (file)
@@ -722,6 +722,10 @@ static void do_headers_fixup(request_rec *r, apr_table_t *headers,
                          echo_header, (void *) &v, r->headers_in, NULL);
             break;
         case hdr_edit:
+            if (!strcasecmp(hdr->header, "Content-Type") && r->content_type) {
+                ap_set_content_type(r, process_regexp(hdr, r->content_type,
+                                                      r->pool));
+            }
             if (apr_table_get(headers, hdr->header)) {
                 edit_do ed;