> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 12, 2001 11:27 AM
> To: Tim Bunce
> Cc: [EMAIL PROTECTED]
> Subject: Re: from the "quick hacks" department... x-bit 
> controls mod_cgi
> 
> 
> >>>>> "Tim" == Tim Bunce <[EMAIL PROTECTED]> writes:
> 
> Tim> On Wed, Apr 11, 2001 at 08:22:38PM -0700, Randal L. 
> Schwartz wrote:
> >> 
> >> In an .htaccess, I place:
> >> 
> >> Options +ExecCGI
> >> PerlFixupHandler "sub { -f $_[0]->filename and -x _ and 
> $_[0]->handler(q{cgi-script}) }"
> >> 
> >> Now any executable file in this directory (or below) is 
> processed with
> >> mod_cgi.  Any non-executable file is processed with 
> whatever the MIME
> >> engine came up with before.
> >> 
> >> OK, too cool to not pass on. :)
> 
> Tim> Except that I think you'll find that string is being 
> recompiled for
> Tim> each request - slow and leaks memory. The principle is 
> good though :)
> 
> Well, then, untested:
> 
> ..htaccess:
> 
>     PerlFixupHandler Stonehenge::XBitCGI
>     Options +ExecCGI
> 
> $INC/Stonehenge/XBitCGI.pm
> 
>     sub Stonehenge::XBitCGI::handler {
>       -f $_[0]->filename and -x _ and $_[0]->handler(q{cgi-script});
>       return -1;
>     }
> 
> Better? :)

s/finfo/filename/

;)

--Geoff

> 
> -- 
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - 
> +1 503 777 0095
> <[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and 
> open-enrollment Perl training!
> 

Reply via email to