fix blocked CGI read

This commit is contained in:
Sergey Lyubka committed 2010-11-15 10:41:17 +01:00
1 parent f23d9ff3b0
commit 1de7fef760
3 files changed
+19 -18

No files matched your search

+4 -9
View File
@@ -1,16 +1,11 @@
#!/usr/bin/env perl
use Cwd;
use CGI;
use vars '%in';
CGI::ReadParse();
print "Content-Type: text/html\r\n\r\n";
# Make stdout unbuffered
$| = 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";
flush STDOUT;
sleep 5;
sleep 3;