mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 11:09:01 +08:00
08bf149d85
Using STDOUT->autoflush(1) seems to work better than $|=1 - I don't know why. Also made the timeout.cgi test a bit more verbose.
13 lines
336 B
Perl
Executable File
13 lines
336 B
Perl
Executable File
#!/usr/bin/env perl
|
|
|
|
# Make stdout unbuffered
|
|
use FileHandle;
|
|
STDOUT->autoflush(1);
|
|
|
|
# This script outputs some content, then sleeps for 5 seconds, then exits.
|
|
# Web server should return the content immediately after it is sent,
|
|
# not waiting until the script exits.
|
|
print "Content-Type: text/html\r\n\r\n";
|
|
print "Some data";
|
|
sleep 3;
|