OLD | NEW |
1 #!/usr/bin/perl -wT | 1 #!/usr/bin/perl -wT |
2 use CGI; | 2 use CGI; |
| 3 use HTTP::Date; |
3 use Time::HiRes; | 4 use Time::HiRes; |
4 | 5 |
5 my $cgi = new CGI; | 6 my $cgi = new CGI; |
6 my $delay = $cgi->param('delay'); | 7 my $delay = $cgi->param('delay'); |
7 $delay = 1000 unless $delay; | 8 $delay = 1000 unless $delay; |
| 9 my $now = time2str(time); |
8 | 10 |
9 print "Content-type: application/octet-stream\n"; | 11 # Last-modified is needed so that memory cache decides to perform revalidation. |
10 print "Cache-control: no-cache, no-store\n\n"; | 12 print "Last-modified: $now\n"; |
| 13 print "Content-type: application/octet-stream\n\n"; |
11 Time::HiRes::sleep($delay / 1000); | 14 Time::HiRes::sleep($delay / 1000); |
12 open FH, "<../resources/Ahem.ttf" or die; | 15 open FH, "<../resources/Ahem.ttf" or die; |
13 while (<FH>) { print; } | 16 while (<FH>) { print; } |
14 close FH; | 17 close FH; |
OLD | NEW |