You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jerry Baker <je...@attbi.com> on 2002/07/20 00:10:44 UTC

Env doesn't work right?

If I have the following in httpd.conf:

SetEnv test_env 1
BrowserMatch "Gecko" !test_env

test_env is not removed when accessed with Mozilla as advertised in the 
documentation (as verified by printenv.pl).

I also tried just flat out:

BrowserMatch "Gecko" test_env
BrowserMatch "Gecko" !test_env

and it was not removed in that case either. Am I doing something wrong?



Re: Env doesn't work right?

Posted by Brian Pane <br...@apache.org>.
Jerry Baker wrote:

> If I have the following in httpd.conf:
>
> SetEnv test_env 1
> BrowserMatch "Gecko" !test_env
>
> test_env is not removed when accessed with Mozilla as advertised in 
> the documentation (as verified by printenv.pl). 


I can duplicate this problem.  It's happening because
mod_env's fixup callback is invoked after mod_setenvif's,
so the SetEnv overrides the BrowserMatch.

I think the we should mod_env so that it registers its
fixup function as APR_HOOK_FIRST instead of APR_HOOK_MIDDLE-
unless anyone knows of a good reason why the current ordering
needs to remain.

--Brian