| OLD | NEW |
| 1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -wT |
| 2 | 2 |
| 3 use strict; | 3 use strict; |
| 4 use CGI; | 4 use CGI; |
| 5 use Time::HiRes qw(sleep); | 5 use Time::HiRes qw(sleep); |
| 6 | 6 |
| 7 my $cgi = new CGI; | 7 my $cgi = new CGI; |
| 8 my $delay = $cgi->param('delay'); | 8 my $delay = $cgi->param('delay'); |
| 9 $delay = 5000 unless $delay; | 9 $delay = 5000 unless $delay; |
| 10 | 10 |
| 11 # flush the buffers after each print | 11 # flush the buffers after each print |
| 12 select (STDOUT); | 12 select (STDOUT); |
| 13 $| = 1; | 13 $| = 1; |
| 14 | 14 |
| 15 print "Content-Type: application/javascript\n"; | 15 print "Content-Type: application/javascript\n"; |
| 16 print "Expires: Thu, 01 Dec 2003 16:00:00 GMT\n"; | 16 print "Expires: Thu, 01 Dec 2003 16:00:00 GMT\n"; |
| 17 print "Cache-Control: no-store, no-cache, must-revalidate\n"; | 17 print "Cache-Control: no-store, no-cache, must-revalidate\n"; |
| 18 print "Pragma: no-cache\n"; | 18 print "Pragma: no-cache\n"; |
| 19 print "\n"; | 19 print "\n"; |
| 20 | 20 |
| 21 sleep $delay / 1000; | 21 sleep $delay / 1000; |
| 22 | 22 |
| 23 | 23 |
| OLD | NEW |