stas 2003/05/29 22:23:34
Modified: lib/Apache SizeLimit.pm . Changes Log: Change Apache::SizeLimit to not push a cleanup handler if already in the cleanup handler phase, and adjust docs to show that cleanup handler is the preferred phase to use Submitted by: Perrin Harkins <[EMAIL PROTECTED]> Revision Changes Path 1.10 +9 -5 modperl/lib/Apache/SizeLimit.pm Index: SizeLimit.pm =================================================================== RCS file: /home/cvs/modperl/lib/Apache/SizeLimit.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- SizeLimit.pm 14 Mar 2002 05:27:43 -0000 1.9 +++ SizeLimit.pm 30 May 2003 05:23:34 -0000 1.10 @@ -18,9 +18,7 @@ $Apache::SizeLimit::MAX_UNSHARED_SIZE = 12000; # 12MB # in your httpd.conf: - PerlFixupHandler Apache::SizeLimit - # you can set this up as any Perl*Handler that handles part of the - # request, even the LogHandler will do. + PerlCleanupHandler Apache::SizeLimit Or you can just check those requests that are likely to get big, such as CGI requests. This way of checking is also easier for those who are mostly @@ -254,8 +252,14 @@ sub handler { my $r = shift || Apache->request; - $r->post_connection(\&exit_if_too_big) - if ($r->is_main); + if ($r->is_main()) { + # we want to operate in a cleanup handler + if ($r->current_callback eq 'PerlCleanupHandler') { + exit_if_too_big($r); + } else { + $r->post_connection(\&exit_if_too_big); + } + } return(DECLINED); } 1.668 +5 -0 modperl/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.667 retrieving revision 1.668 diff -u -r1.667 -r1.668 --- Changes 25 May 2003 10:54:06 -0000 1.667 +++ Changes 30 May 2003 05:23:34 -0000 1.668 @@ -10,6 +10,11 @@ =item 1.27_01-dev +Change Apache::SizeLimit to not push a cleanup handler if already in +the cleanup handler phase, and adjust docs to show that cleanup +handler is the preferred phase to use [Perrin Harkins +<[EMAIL PROTECTED]>] + Rename Apache::test to Apache::testold because Apache::test on case-insensitive systems will collide with Apache::Test which supercedes Apache::test. So if you want to keep on using Apache::test,