Hi, mod_perl provides the Apache2::RequestUtil::add_config function that accepts $override as the 2nd parameter. For apache 2.0 it is possible to set Options by
$r->add_config(['Options Indexes ExecCGI'], Apache2::Const::OR_OPTIONS).
This does not work with 2.2. The reason is the more detailed AllowOverride
statement. It introduces a new field in cmd_parms (override_opts) that holds
the detailed setting.
struct cmd_parms_struct {
/** Argument to command from cmd_table */
void *info;
/** Which allow-override bits are set */
int override;
[...]
/** Which allow-override-opts bits are set */
int override_opts;
};
The current implementation of modperl_config_insert() creates a cmd_parms
struct where override_opts is always zero. Hence the add_config statement
above will always fail.
I suggest the patch below to solve the problem.
Torsten
--- src/modules/perl/modperl_config.c~ 2005-10-21 02:04:26.000000000 +0200
+++ src/modules/perl/modperl_config.c 2006-02-02 18:33:22.468616732 +0100
@@ -515,6 +515,9 @@
parms.override = override;
parms.path = path;
parms.pool = p;
+#if AP_SERVER_MAJORVERSION_NUMBER>2 || AP_SERVER_MINORVERSION_NUMBER>=2
+ parms.override_opts = ~0;
+#endif
if (ptmp) {
parms.temp_pool = ptmp;
pgp8Uu9ZbzD0x.pgp
Description: PGP signature
