Are you sure mod_deflate isn't one of your active Apache filters?  mod_deflate 
will not output until its buffer is full, $| notwithstanding.  I tore my hair 
out trying to work around it, and ended up writing my own compression filter.  
But if you don't need compression, try disabling mod_deflate.

-Alex


On Friday 16 September 2005 05:36 am, pradeep kumar wrote:
> Can you please elaborate on why apache filters can be an issue with the
> autoflush problem that I noticed ?
>
> Also, I noticed that the autoflush work properly when I flush it to a
> regular file. Its only when I choose STDOUT that the flushing gets delayed.
> Is there some buffering that happens with STDOUT alone ? I am confused if
> this is a modperl problem or an Apache problem.
>
> On 9/12/05, pradeep kumar <[EMAIL PROTECTED]> wrote:
> > Hi Tom,
> >  I am using mp2.
> >  Thanks and Regards,
> > Pradeep
> >
> >  On 9/12/05, Tom Schindl <[EMAIL PROTECTED]> wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > What version of mp are you using if you are running mp2 i think the
> > > apache-filter-system is the problem.
> > >
> > > Tom
> > >
> > > pradeep kumar wrote:
> > > > Hi,
> > > >
> > > > I have a perl script which uses $| to set autoflush on. Basically, it
> > > > flushes after every print. This script is working fine from the
> > >
> > > command
> > >
> > > > line when run using standalone perl interpreter. But when the same
> > > > script is accessed via mod_perl/apache setup, mod_perl is not
> > > > flushing after every print, instead buffering and printing all output
> > > > at one
> > >
> > > shot.
> > >
> > > > Any idea why $| is not working with mod_perl.
> > > >
> > > > Here is my sample script:
> > > >
> > > > #!/usr/bin/perl -w
> > > >
> > > > use CGI qw/:standard/;
> > > > use strict;
> > > > select(STDOUT);
> > > > $| = 1;
> > > > print STDOUT "Content-type: text/html\n\n"; print STDOUT <<END;
> > > > <html> <head> </head> <body> END print STDOUT 'hello'; print STDOUT
> > > > '<br>'; sleep(2); print STDOUT 'World'; print STDOUT '<br>';
> > > > sleep(2); print STDOUT 'Testing'; print STDOUT "</body></html>";
> > > >
> > > >
> > > > Thanks in advance,
> > > > Pradeep
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.0 (GNU/Linux)
> > > Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org
> > >
> > > iD8DBQFDJTzSkVPeOFLgZFIRApj0AKCMTBdxV+2QHD3A09oXuZH86Qv1/wCgoSuu
> > > 8w1b1u2xYzy6lZF9XJA3GD8=
> > > =VjYy
> > > -----END PGP SIGNATURE-----

Reply via email to