1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-08-07 16:02:55 +03:00

fix blocked CGI read

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

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;