I don't think having the handler set as perl-script would have any
affect. I have done this in a bunch of different places without any
problem using SetHandler modperl and SetHandler perl-script.
That being said, using either of the other two options you suggest would
be better than returning DECLINED i think.
Adam
-----Original Message-----
From: Perrin Harkins [mailto:suppressed
Sent: Monday, April 02, 2007 12:29 PM
To: Adam Prime x443
Cc: foobar; suppressed
Subject: Re: mod_perl2 handler headache
On 4/2/07, Adam Prime x443 <suppressed> wrote:
>
> you want:
>
> sub handler {
> my $r = shift;
> my $uri = $r->uri;
> return DECLINED if $url =~ /^\/gallery;
>
> # not a gallery request... do some stuff and return an XML
document
>
> }
I don't think it's that simple. He must have already set perl-script
as the handler for this location, so it won't just use the default if
you decline.
A good way to do this is shown here:
http://perl.apache.org/docs/1.0/guide/config.html#Overriding_E_lt_Locati
onE_gt__Setting_in__Sub_Location_
Basically, you make a Location block like this:
<Location "/gallery">
SetHandler default-handler
</Location>
Another approach would be to change the locations so they don't
overlap, e.g. put the XML stuff at /xml or use FilesMatch *.xml
instead of /. (And that LocationMatch / isn't anchored to the
beginning of the URL, is it? It's going to match any URL with a /
anywhere in it.)
- Perrin
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.