Auto flush doesn't work as expected

L

Leif Wessman

Auto flush doesn't work for me. I've read the FAQ.

#!/usr/local/bin/perl -w
use strict;
$| = 1;
print "Content-type: text/html\n\n";
print "Printed at once<br>";
sleep(3);
print "3 seconds later";

Everything gets printed after 3 seconds. However, when I try it from
the command line it works.

I'm using Apache/2.0.54 and perl 5.8.0.

Leif
 
T

Tony Curtis

On 15 Jun 2006 04:43:44 -0700,
Auto flush doesn't work for me. I've read the FAQ.
#!/usr/local/bin/perl -w
use strict;
$| = 1;
print "Content-type: text/html\n\n";
print "Printed at once<br>";
sleep(3);
print "3 seconds later";
Everything gets printed after 3 seconds. However, when I
try it from the command line it works.

So there's nothing wrong with the code and autoflush is
actually doing what you expect...
I'm using Apache/2.0.54 and perl 5.8.0.

This is a question about how a browser renders data
claiming to be HTML.
 
L

Leif Wessman

I've found the problem. I was using a anti-virus software called
Kaspersky. They analyze all HTTP traffic. You can guess what the side
effect was...

Thanks for all help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top