summaryrefslogtreecommitdiffstats
path: root/src/civetweb/test/timeout.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'src/civetweb/test/timeout.cgi')
-rwxr-xr-xsrc/civetweb/test/timeout.cgi12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/civetweb/test/timeout.cgi b/src/civetweb/test/timeout.cgi
new file mode 100755
index 00000000..32482056
--- /dev/null
+++ b/src/civetweb/test/timeout.cgi
@@ -0,0 +1,12 @@
+#!/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;