From: Doug MacEachern Date: Thu, 23 Aug 2001 04:15:37 +0000 (+0000) Subject: fix part of PR #7528 X-Git-Tag: 2.0.25~157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e1b62912e58df577a1d6b240b8a9a6976ea53c1;p=apache fix part of PR #7528 "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 --- diff --git a/modules/metadata/mod_env.c b/modules/metadata/mod_env.c index ebe112b859..6b5873e023 100644 --- a/modules/metadata/mod_env.c +++ b/modules/metadata/mod_env.c @@ -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; }