Hi all,
I hope this message is appropriate here and won't break
any of the holy rules of the list...
I've recently upgraded my production environment to
modperl 2.0.1 and Apache 2.0.54 under linux and Mason
1.29_02. I run a pretty complicated, but powerful
configuration and everything is ok. Porting all of my
stuff to MP2, I really felt that it is not yet documented
as one would expect.
For example I'd like to know more about Apache's request
life cycle. I scanned all the documents available online,
but didn't really find something which explains in details
when the major hooks of Perl*Handlers really happen (and
their relationships with Apache's modules).
I try to ask here a few questions (no homework -:):
-when does mod_dir really make its job?
-How comes that, if serving a directory under SetHandler
modperl, one can have mod_dir doing its job by means of a
PerlFixupHanlder, simply setting
$r->handler('APACHE_MAGIC_DIR') and returning OK?
-Does this mean that the cycle has to restart, since the
PerlResponseHandler (or eventually e default-handler) is
never run?
-Why does this simple PerlTypeHandler:
package Apache::MIMEMagic;
$Apache::MIMEMagic::VERSION='0.10';
use Apache2::Const -compile => qw(OK DECLINED);
use File::MMagic;
use strict;
sub handler {
my $r = shift;
my $ct;
if (defined $r->filename && $r->filename) {
$ct=File::MMagic->new->checktype_filename($r->filename);
}
$r->handler('default-handler');
$r->content_type($ct);
return Apache2::Const::OK;
}
1;
(if applied server wide) completely break for ALL of the
directories under DocumentRoot the behaviour of mod_dir
(DirectoryIndex lists completely ignored)?
Hoping I won't get neither ignored nor flamed, thanx in
advance.
Michele