perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Moseley <>
Subject Accessing apache request configuration from mp2
Date Thu, 09 Jul 2009 20:10:15 GMT
This is a case of I'm pretty sure I saw this before but can't for the
life of me remember where -- so it might not even be possible.

I'm trying to access the values of the 'Order', 'Allow', and 'Deny'
apache directives, as they're set at request time, i.e. after merging.
Basically what I want to do is set a flag if a directory has changed
the default Order/Allow/Deny via .htaccess, so it can add a header
than a reverse proxy upstream can know not to cache it. This is on
apache 2.2.10 w/ mod_perl 2.0.4. I haven't been able to track down in
the mod_perl2 API, since I'm not sure exacty what to look for (and the
only relevant search terms I can think of turn up an endless amount of
false hits), and indeed it might not even be possible.

I've tried playing around with Apache2::Module mostly. If I do
something like (with Apache::DB going):

DB<31> my $module = Apache2::Module::find_linked_module(
'mod_authz_host.c' );
DB<32> print $module->get_config( $r->server, $r->per_dir_config  )

This returns undef too:

DB<26> my $c = Apache2::Module::get_config( $module, $r->server,
$r->per_dir_config  ); print $c

I never get anything back besides undef. I've tried also looking at
things like Apache2::RequestUtil::request_config and
$r->per_dir_config, but everything returns the same undocumented type
Apache2::ConfVector, which appears to be not able to be peeked at.

Any words of wisdom or hints or even just confirmations that it's even
possible? Thanks!

View raw message