Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

finding "context" in mod_perl handler

André Warnier

2009-04-21

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi.

Supposing I have this kind of setup

<Location /xyz>
 PerlAuthenhandler My::AuthModule
 ...
</Location>

...

<Directory /var/www/some/path>
 PerlAuthenhandler My::AuthModule
 ...
</Directory>

and a request is made for "/xyz", and as a result the module is called,

is there some way in My::AuthModule::handler(), by which I can find out
that, in *this* instance, I am being called in the "context" of the
<Location> directive above, as opposed to the <Directory> case ?

I mean, I could do something like respectively
 PerlSetVar context "location:/xyz"
and
 PerlSetVar context "dir:/some/path"

and then check the var in the handler, but there has to be a
better/cleaner way, no ?

Thanks
André
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.