]> granicus.if.org Git - apache/commitdiff
fix part of PR #7528
authorDoug MacEachern <dougm@apache.org>
Thu, 23 Aug 2001 04:15:37 +0000 (04:15 +0000)
committerDoug MacEachern <dougm@apache.org>
Thu, 23 Aug 2001 04:15:37 +0000 (04:15 +0000)
"UnsetEnv does not work from main body of httpd.conf"
PR also complains:
"also does not unsetenv()", but this fix does not address that
(i doubt unsetenv is portable or threadsafe)
PR:
Obtained from:
Submitted by:
Reviewed by:

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

modules/metadata/mod_env.c

index ebe112b859e321a883165631a5d6f9b7a56055b2..6b5873e023e56ad9c911942f656c4cd8bae4c099 100644 (file)
@@ -230,6 +230,14 @@ static const char *add_env_module_vars_unset(cmd_parms *cmd, void *sconf_,
         ? apr_pstrcat(cmd->pool, sconf->unsetenv, " ", arg, NULL)
         : arg;
 
+    if (sconf->vars_present && !cmd->path) {
+        /* if {Set,Pass}Env FOO, UnsetEnv FOO
+         * are in the base config, merge never happens,
+         * unset never happens, so just unset now
+         */
+        apr_table_unset(sconf->vars, arg);
+    }
+
     return NULL;
 }