I have two problems related to setting Location directives from within
perl sections that I don't understand (I've looked at the mod_perl guide
and the archive but a RTFM is certainly welcome ;)
First problem: <Location> works on url space only while $Location
requires existing directories (full httpd.conf atatched):
DocumentRoot /tmp
<Location /perl-status>
SetHandler perl-script
PerlHandler Apache::Status
</Location>
<Perl>
$Location{'/test'} = {
SetHandler => 'perl-script',
PerlHandler => "Apache::Status",
};
</Perl>
The first location works fine. The second one doesn't UNTIL I mkdir
/tmp/test (there is no /tmp/perl-status), after which I get the
perl-status page on both urls.
The second problem (which I can't reproduce with a small example) is that,
when using a lot of entries in %Location, they suddenly start to behave
like LocationMatch, i.e.:
$Location{'/admin'} = { ... };
matches /test/admin, /something/else/admin/jump, /cgi-bin/printenv/admin
and everything else that contains /admin IFF the url does not directly
point to something hat can be displayed (e.g. the printenv is a cgi script
but it doesn't get called).
If I change this to:
$Location{'^/admin'} = { ... };
it suddenly starts to work as expected, indeed as if LocationMatch was
used. However, this is not deterministic. Sometimes the above simply
matches nothing ;)
Does this ring a bell for somebody? I ahd the same problem with
apache-1.3.14 and mod_perl-1.24 I upgraded to apache-1.3.17 and modperl
from cvs but the symptoms didn't change so I guess it might not be a bug
but rather some misunderstanding on my side :(
--
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / [EMAIL PROTECTED] |e|
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
The choice of a GNU generation |
|
ServerType standalone
PerlFreshRestart off
HostnameLookups off
User nobody
Group nobody
ServerName doom.laendle
ServerRoot /tmp
DocumentRoot /tmp
Port 81
PerlModule Apache::Status
<Location /perl-status>
SetHandler perl-script
PerlHandler Apache::Status
</Location>
<Perl>
$Location{'/test'} = {
SetHandler => 'perl-script',
PerlHandler => "Apache::Status",
};
</Perl>