You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jayaram A <ja...@wipinfo.soft.net> on 1999/10/27 11:11:17 UTC
[PATCH] for PR# 4856 : problem with 1.3.9 mod_env module.
Hello All,
Please comment on the below fix the problem in mod_env module.
-----------------------------------------------------------------------
The Problem:
------------
It is found that UnSetEnv directive fails to unset the environment
variable in the server config context.
for example, with the following 2 directives in the httpd.conf:
SetEnv MYVAR myvar
UnSetEnv MYVAR
one would expect that the /cgi-bin/printenv will not list MYVAR in the
list of environment varaibles, where as the 1.3.9 apache does not
behave like this.
The attachment listing the fix for this: mod_env.c.diffs
(diff -C 3 apache_1.3.9/src/modules/standard/mod_env.c.org \
apache_1.3.9/src/modules/standard/mod_env.c.new)
NOTE: This fixes the Apache bug report (PR)# 4856.
-----------------------------------------------------------------------
Thanks and Regards,
Jayaram.
Re: [PATCH] for PR# 4856 : problem with 1.3.9 mod_env module.
Posted by Manoj Kasichainula <ma...@io.com>.
On Wed, Oct 27, 1999 at 02:41:17PM +0530, Jayaram A wrote:
> Please comment on the below fix the problem in mod_env module.
I don't know this module at all, but the patch seems okay to me.
BTW, please use unified diffs if you can. I know dev.apache.org says
to use -C3, but that's because many diff tools don't support -u.
> + if ( base->unsetenv ) {
> + new->unsetenv = (char *)ap_palloc(p, strlen(base->unsetenv)+1);
> + memcpy(new->unsetenv, base->unsetenv, strlen(base->unsetenv)+1);
> + } else
> + new->unsetenv = "";
> +
I guess this hunk fixes a problem where unsetenvs aren't inherited but
setenvs are?
--
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/