You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philippe M. Chiasson" <go...@ectoplasm.org> on 2004/08/07 01:09:21 UTC
, PerlModule, PerlRequire in .htaccess
I am looking at pending issues in todo/release, and I came upon this issue
Right now, <Perl> PerlModule PerlRequire can _only_ be used in Global
configuration and server scope. No <Location>, htacceess, etc.
The orignial conversation about this is here :
http://marc.theaimsgroup.com/?t=105370088700001&r=1&w=2
I'd like to quote Stas from the last e-mail in the thread:
"However doing this via proposed MP_CMD_DIR_TAKE1 doesn't seem right.
We need to add .htaccess, but not change the SRV directives to DIR."
I agree with him, .htaccess support makes sense, and would mean re-executing
that operation for each request, IMO.
So if you PerlRequire /foo/bar.pl in some .htaccess, it will get
required on each
request, same for <Perl> sections.
The question I have for all, is how can we make a directive support
.htaccess without
also allowing it in blocks. AFAIK, the httpd API only allows OR_ALL for
this and
it's both .htaccess and blocks.
Thoughts ?
Re: , PerlModule, PerlRequire in .htaccess
Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Philippe M. Chiasson wrote:
> Stas Bekman wrote:
>
>> Philippe M. Chiasson wrote:
>>
>>>
[...]
>>> The question I have for all, is how can we make a directive support
>>> .htaccess without
>>> also allowing it in blocks. AFAIK, the httpd API only allows OR_ALL
>>> for this and
>>> it's both .htaccess and blocks.
>>
>>
>>
>> How was this done in mp1?
>
>
> Just found out there is a way to tell them apart (from mp1).
> cmd_param->path is NULL unless
> you are in .htaccess context.
>
> So, the way to fix this would be to change the wanted directives to
> OR_ALL and create a macro
> to slap at the beginning of each of them that check for param->path !=
> null or bombs out. Working
> on it.
>
It's in and the macro is called MP_CHECK_SERVER_OR_HTACCESS_CONTEXT.
So now, <Perl> PerlModule and PerlRequire will be honored in .htaccess
and will be
executed on each request.
http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=109184714017267&w=2
Re: , PerlModule, PerlRequire in .htaccess
Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:
> Philippe M. Chiasson wrote:
>
>> I am looking at pending issues in todo/release, and I came upon this
>> issue
>>
>> Right now, <Perl> PerlModule PerlRequire can _only_ be used in Global
>> configuration and server scope. No <Location>, htacceess, etc.
>>
>> The orignial conversation about this is here :
>> http://marc.theaimsgroup.com/?t=105370088700001&r=1&w=2
>>
>> I'd like to quote Stas from the last e-mail in the thread:
>>
>> "However doing this via proposed MP_CMD_DIR_TAKE1 doesn't seem right.
>> We need to add .htaccess, but not change the SRV directives to DIR."
>>
>> I agree with him, .htaccess support makes sense, and would mean
>> re-executing
>> that operation for each request, IMO.
>>
>> So if you PerlRequire /foo/bar.pl in some .htaccess, it will get
>> required on each
>> request, same for <Perl> sections.
>>
>> The question I have for all, is how can we make a directive support
>> .htaccess without
>> also allowing it in blocks. AFAIK, the httpd API only allows OR_ALL
>> for this and
>> it's both .htaccess and blocks.
>
>
> How was this done in mp1?
Just found out there is a way to tell them apart (from mp1).
cmd_param->path is NULL unless
you are in .htaccess context.
So, the way to fix this would be to change the wanted directives to
OR_ALL and create a macro
to slap at the beginning of each of them that check for param->path !=
null or bombs out. Working
on it.
Re: , PerlModule, PerlRequire in .htaccess
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> I am looking at pending issues in todo/release, and I came upon this issue
>
> Right now, <Perl> PerlModule PerlRequire can _only_ be used in Global
> configuration and server scope. No <Location>, htacceess, etc.
>
> The orignial conversation about this is here :
> http://marc.theaimsgroup.com/?t=105370088700001&r=1&w=2
>
> I'd like to quote Stas from the last e-mail in the thread:
>
> "However doing this via proposed MP_CMD_DIR_TAKE1 doesn't seem right.
> We need to add .htaccess, but not change the SRV directives to DIR."
>
> I agree with him, .htaccess support makes sense, and would mean
> re-executing
> that operation for each request, IMO.
>
> So if you PerlRequire /foo/bar.pl in some .htaccess, it will get
> required on each
> request, same for <Perl> sections.
>
> The question I have for all, is how can we make a directive support
> .htaccess without
> also allowing it in blocks. AFAIK, the httpd API only allows OR_ALL for
> this and
> it's both .htaccess and blocks.
How was this done in mp1?
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org