timeout.cgi 341 B

12345678910111213141516
  1. #!/usr/bin/env perl
  2. use Cwd;
  3. use CGI;
  4. use vars '%in';
  5. CGI::ReadParse();
  6. print "Content-Type: text/html\r\n\r\n";
  7. # This script outputs some content, then sleeps for 5 seconds, then exits.
  8. # Web server should return the content immediately after it is sent,
  9. # not waiting until the script exits.
  10. print "Some data";
  11. flush STDOUT;
  12. sleep 5;