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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user