httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r894034 - in /httpd/httpd/trunk: CHANGES modules/metadata/mod_headers.c
Date Sat, 26 Dec 2009 23:05:39 GMT
Author: niq
Date: Sat Dec 26 23:05:39 2009
New Revision: 894034

URL: http://svn.apache.org/viewvc?rev=894034&view=rev
Log:
mod_headers: align Header Edit with Header Set on Content-Type
PR 48422
Adapted patch from Cyril Bonté

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/metadata/mod_headers.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=894034&r1=894033&r2=894034&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sat Dec 26 23:05:39 2009
@@ -33,6 +33,9 @@
   *) 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,

Modified: httpd/httpd/trunk/modules/metadata/mod_headers.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_headers.c?rev=894034&r1=894033&r2=894034&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_headers.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_headers.c Sat Dec 26 23:05:39 2009
@@ -722,6 +722,10 @@
                          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;
 



Mime
View raw message