geoff 2004/02/20 06:11:31
Modified: . Changes lib/ModPerl Code.pm Log: Perl handlers are now guaranteed to run before core C handlers for all request phases Revision Changes Path 1.333 +3 -0 modperl-2.0/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.332 retrieving revision 1.333 diff -u -r1.332 -r1.333 --- Changes 17 Feb 2004 01:22:42 -0000 1.332 +++ Changes 20 Feb 2004 14:11:31 -0000 1.333 @@ -12,6 +12,9 @@ =item 1.99_13-dev +Perl handlers are now guaranteed to run before core C handlers for +all request phases. [Geoffrey Young] + Fix the STDIN/OUT overriding process to handle gracefully cases, when either or both are closed/bogus (the problem was only with useperlio enabled perl) [Stas] 1.117 +8 -1 modperl-2.0/lib/ModPerl/Code.pm Index: Code.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v retrieving revision 1.116 retrieving revision 1.117 diff -u -r1.116 -r1.117 --- Code.pm 12 Feb 2004 23:06:23 -0000 1.116 +++ Code.pm 20 Feb 2004 14:11:31 -0000 1.117 @@ -33,6 +33,9 @@ my %not_ap_hook = map { $_, 1 } qw(child_exit response cleanup output_filter input_filter); +my %not_request_hook = map { $_, 1 } qw(child_init process_connection + pre_connection open_logs post_config); + my %hook_proto = ( Process => { ret => 'void', @@ -218,8 +221,12 @@ if (my $hook = $hooks{$handler}) { next if $not_ap_hook{$hook}; + + my $order = $not_request_hook{$hook} ? 'APR_HOOK_FIRST' + : 'APR_HOOK_REALLY_FIRST'; + push @register_hooks, - " ap_hook_$hook($name, NULL, NULL, APR_HOOK_FIRST);"; + " ap_hook_$hook($name, NULL, NULL, $order);"; } my($protostr, $pass) = canon_proto($prototype, $name);