Commit 2fca647b authored by Doug MacEachern's avatar Doug MacEachern
Browse files

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
parent 8b136792
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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;
}