httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r1726705 - in /httpd/httpd/trunk: CHANGES modules/filters/mod_filter.c
Date Mon, 25 Jan 2016 22:31:19 GMT
Author: niq
Date: Mon Jan 25 22:31:19 2016
New Revision: 1726705

URL: http://svn.apache.org/viewvc?rev=1726705&view=rev
Log:
mod_filter: Fix AddOutputFilterByType with non-content-level filters.
PR58856  (Micha Lenk)

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/filters/mod_filter.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1726705&r1=1726704&r2=1726705&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Jan 25 22:31:19 2016
@@ -1,5 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
+
+  *) mod_filter: Fix AddOutputFilterByType with non-content-level filters.
+     PR58856 [Micha Lenk <micha lenk.info>]
  
   *) mod_cache: Consider Cache-Control: s-maxage in expiration
      calculations.  [Eric Covener]

Modified: httpd/httpd/trunk/modules/filters/mod_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_filter.c?rev=1726705&r1=1726704&r2=1726705&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_filter.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_filter.c Mon Jan 25 22:31:19 2016
@@ -444,6 +444,12 @@ static const char *add_filter(cmd_parms
     ap_expr_info_t *node;
     const char *err = NULL;
 
+    /* if provider has been registered, we can look it up */
+    provider_frec = ap_get_output_filter_handle(pname);
+    if (!provider_frec) {
+        return apr_psprintf(cmd->pool, "Unknown filter provider %s", pname);
+    }
+
     /* fname has been declared with DeclareFilter, so we can look it up */
     frec = apr_hash_get(cfg->live_filters, fname, APR_HASH_KEY_STRING);
 
@@ -454,17 +460,13 @@ static const char *add_filter(cmd_parms
             return c;
         }
         frec = apr_hash_get(cfg->live_filters, fname, APR_HASH_KEY_STRING);
+        frec->ftype = provider_frec->ftype;
     }
 
     if (!frec) {
         return apr_psprintf(cmd->pool, "Undeclared smart filter %s", fname);
     }
 
-    /* if provider has been registered, we can look it up */
-    provider_frec = ap_get_output_filter_handle(pname);
-    if (!provider_frec) {
-        return apr_psprintf(cmd->pool, "Unknown filter provider %s", pname);
-    }
     provider = apr_palloc(cmd->pool, sizeof(ap_filter_provider_t));
     if (expr) {
         node = ap_expr_parse_cmd(cmd, expr, 0, &err, NULL);



Mime
View raw message