The current version of the revised mod_info.c: <http://rici.ricilake.net/src/mod_info.c>
(for those who prefer looking at patches, <http://rici.ricilake.net/src/mod_info.diff>
was created with diff -b -u because of a largish code indent and the fact that the original had a mix of tabbed and non-tabbed lines; the first file is detabbed).
In order to actually get this to work with mod_perl, a small patch to mod_perl is also
required <http://rici.ricilake.net/src/modperl.diff>. This patch uses pool userdata in
order to tunnel a pointer to the configuration tree into the innards of modperl, where
it can be retrieved in order to attach the configuration tree built by the perl section.
No memory was harmed in the creation of this patch; the mod_perl configuration tree
was always being built; it simply wasn't accessible. (See note below)
The mod_info.c on display has one extra feature: it accepts ?config as a query option;
if encountered, it dumps the entire configuration tree. It also writes filenames and
line numbers (both in the normal and ?config) displays; I figured that was maybe useful.
For those who might like to enable and disable server-info, and other <Location> based
resources, I've also put up <http://rici.ricilake.net/src/mod_fileaccess.c>; this provides
limit-aware access control on the basis of named files. See the comments for documentation.
Rici.
Note: in the course of all of this, I noticed that mod_perl uses the pconf pool to
build directives (and, I believe, config structures) even when invoked in .htaccess
files. This could be a severe memory leak for a production server which allowed
PerlSections in .htaccess files. I've posted separately to the mod_perl mailing
list about this.
