stas 2003/09/18 00:55:53
Modified: src/modules/perl modperl_handler.c Log: mod_perl handler must be dupped for any mpm which runs within USE_ITHREAD. Untill now there was a big problem with prefork mpm if any of its vhosts was using PerlOptions +(Parent|Clone) and happened to load handlers before the main server. When that was happening the main server will see that the handler was resolved (since it sees the handler struct from the vhost that loaded this module, instead of its own), which in fact it wasn't, causing the failure to run the handler with the infamous 'Not a CODE reference' error Revision Changes Path 1.19 +6 -9 modperl-2.0/src/modules/perl/modperl_handler.c Index: modperl_handler.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -u -r1.18 -r1.19 --- modperl_handler.c 18 Sep 2003 07:51:29 -0000 1.18 +++ modperl_handler.c 18 Sep 2003 07:55:52 -0000 1.19 @@ -34,15 +34,12 @@ #ifdef USE_ITHREADS if (p && !MpHandlerPARSED(handler) && !MpHandlerDYNAMIC(handler)) { - MP_dSCFG(s); - if (scfg->threaded_mpm) { - /* - * cannot update the handler structure at request time without - * locking, so just copy it - */ - handler = *handp = modperl_handler_dup(p, handler); - duped = 1; - } + /* + * cannot update the handler structure at request time without + * locking, so just copy it + */ + handler = *handp = modperl_handler_dup(p, handler); + duped = 1; } #endif