We can see that mod_cgi bufferizes the output and sends it with Content-Length HTTP header (to mod_deflate). Indeed mod_perl generates chunked response. Finally we have the same result. I don't see any problem at this moment.
Well, the problem is that I get this error in my error_log:
[Mon Jul 21 14:18:55 2003] [error] 4297: ModPerl::RegistryBB: 20014:Error string not specified yet at /var/www/perl/test.pl line 6.
Also, more important, the script seems to be terminating and/or any output following the 'print ""' is not sent to the client as far as I can tell.
You would probably wish to append your script with additional output after the empty string? Something like:
#!/usr/bin/perl $|=1; print "Content-Type: text/html\n\n"; print "hello world<P>"; # This line causes the error (?) print ""; print "hello again<P>"; ---
When I do this, the mod_perl variant of the script fails to print "hello again<P>".
mod_cgi prints everything just fine and gets no errors.
I changed my test script to print a bunch of `date`'s http://shevek.kenyonhill.com/cgi/test.pl http://shevek.kenyonhill.com/perl/test.pl
It may cause a problem for chunked output if mod_deflate does not care to keep internal buffer and check its size when flushing...
I may not be understanding the output you sent or what you're saying, but I still don't follow why this would be a mod_deflate bug if mod_cgi with the same script has no problem.