]> granicus.if.org Git - apache/commitdiff
mod_substitute: follow up to r1687680.
authorYann Ylavic <ylavic@apache.org>
Mon, 29 Jun 2015 23:44:28 +0000 (23:44 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 29 Jun 2015 23:44:28 +0000 (23:44 +0000)
Fix dir config merger 'over'-write, thanks Bill (again).

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

modules/filters/mod_substitute.c

index efd1a06c6826ea1caeda6a8afa5eb568d32a839f..648f7de28221148f78354c2cb20b8ad270eaaba1 100644 (file)
@@ -86,10 +86,9 @@ static void *merge_substitute_dcfg(apr_pool_t *p, void *basev, void *overv)
     subst_dir_conf *base = (subst_dir_conf *) basev;
     subst_dir_conf *over = (subst_dir_conf *) overv;
 
-    if (over->inherit_before < 0) {
-        over->inherit_before = (base->inherit_before > 0);
-    }
-    if (over->inherit_before) {
+    a->inherit_before = (over->inherit_before > 0 || (over->inherit_before < 0 &&
+                                                      base->inherit_before > 0));
+    if (a->inherit_before) {
         a->patterns = apr_array_append(p, base->patterns,
                                           over->patterns);
     }