From: Nick Kew Date: Sat, 26 Dec 2009 23:05:39 +0000 (+0000) Subject: mod_headers: align Header Edit with Header Set on Content-Type X-Git-Tag: 2.3.5~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65d3f49bac08664f17aec264372977801bf1de21;p=apache mod_headers: align Header Edit with Header Set on Content-Type 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 --- diff --git a/CHANGES b/CHANGES index a5fba36efc..81e0854f87 100644 --- 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é , Nick Kew>] + Changes with Apache 2.3.4 *) Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index 2554681042..e27f504ae6 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -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;