You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Andrew Maltsev <am...@xao.com> on 2004/11/06 00:44:23 UTC
pure fileless requests
Hello,
I use PerlTransHandler to decide if I want to intercept and serve a
request or not. When the request is served by my content handler there
is no file that corresponds to it, directly or indirectly.
I used to just not call $r->filename(...) at all. But under Gentoo's
overtightened default config it fails with access denied. My best guess
-- because it maps to '/' by default and that's denied.
I had to resort to calling $r->filename($r->document_root.'/index.html)
which does solve my problem, but looks terrible. And apache still
translates it to index.html.en, provides finfo() and so -- none of which
I need.
So, my question is -- what is the best way to tell Apache that there is
no file associated with this request, don't bother trying to stat() any
files or run any <Directory> rules.
Thanx!
Oh, and I use latest 2.x versions for development, but the same code
runs in 1.x and 2.x mod_perl/apache setups.
Andrew.
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: pure fileless requests
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> So, my question is -- what is the best way to tell Apache that there is
> no file associated with this request, don't bother trying to stat() any
> files or run any <Directory> rules.
>
> Thanx!
>
> Oh, and I use latest 2.x versions for development, but the same code
> runs in 1.x and 2.x mod_perl/apache setups.
in 1.0 returning OK from a PerlTransHander is sufficient to avoid those
stat() calls, while in 2.0 you need to do this from a PerlMapToStorageHandler.
--Geoff
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html