Torsten Foertsch wrote:
> 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.
Should be OPT_ALL instead of (~0), but it's a sane patch IMO.
Really, what's needed is something to expose these new override options to
mod_perl and allow them too as arguments to add_config().
> ------------------------------------------------------------------------
>
> --- 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;
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature
