stas 2003/08/05 11:51:11
Modified: ModPerl-Registry/t/conf extra.conf.in Added: ModPerl-Registry/t flush.t ModPerl-Registry/t/cgi-bin flush.pl Log: a new flushing test which will work, once mod_deflate is fixed Revision Changes Path 1.1 modperl-2.0/ModPerl-Registry/t/flush.t Index: flush.t =================================================================== use strict; use warnings FATAL => 'all'; use Apache::Test; use Apache::TestUtil; use Apache::TestRequest qw(GET_BODY); plan tests => 1, have 'Compress::Zlib', 'deflate', have_min_apache_version("2.0.49"); #XXX which release the mod_deflate bug is fixed in? Apache/2.0.49? # should probably submit a bug report and use the bug id here so # others can track the problem require Compress::Zlib; my $url = "/registry_bb_deflate/flush.pl"; my $expected = "yet another boring test string"; my $received = GET_BODY $url, 'Accept-encoding' => 'gzip'; my $decompressed = Compress::Zlib::memGunzip($received); ok t_cmp( $expected, $decompressed, "test flush body" ); 1.1 modperl-2.0/ModPerl-Registry/t/cgi-bin/flush.pl Index: flush.pl =================================================================== use strict; use warnings FATAL => 'all'; local $| = 1; # unbuffered mode my $r = shift; print "Content-Type: text/html\n\n"; print "yet another boring test string"; # This line passes a bucket brigade with a single bucket FLUSH # it was causing problems in the mod_deflate filter which was trying to # deflate empty output buffer, (the previous print has already flushed # all the output) (the fix in mod_deflate.c was to check whether the # buffer is full) print ""; 1.10 +18 -0 modperl-2.0/ModPerl-Registry/t/conf/extra.conf.in Index: extra.conf.in =================================================================== RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/conf/extra.conf.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- extra.conf.in 6 Feb 2003 23:57:08 -0000 1.9 +++ extra.conf.in 5 Aug 2003 18:51:10 -0000 1.10 @@ -128,3 +128,21 @@ Options +ExecCGI PerlResponseHandler ModPerl::Registry </Location> + +### deflate tests ### + +Alias /registry_bb_deflate/ @ServerRoot@/cgi-bin/ + +#PerlOutputFilterHandler ModPerl::TestFilterDebug::snoop_connection +PerlModule ModPerl::RegistryBB +<Location /registry_bb_deflate> + PerlOptions +GlobalRequest + SetHandler perl-script + Options +ExecCGI + PerlResponseHandler ModPerl::RegistryBB + PerlOptions +ParseHeaders + #PerlOutputFilterHandler ModPerl::TestFilterDebug::snoop_request + <IfModule mod_deflate.c> + SetOutputFilter DEFLATE + </IfModule> +</Location> \ No newline at end of file