OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/perl -wT | |
sof
2015/08/20 14:56:58
nit: is the use of perl crucial? (I thought we wer
Kunihiko Sakamoto
2015/08/21 01:37:06
Rewrote it with php.
| |
2 use strict; | |
3 | |
4 my $query = $ENV{"QUERY_STRING"}; | |
5 my $cookie = $ENV{"HTTP_COOKIE"}; | |
6 | |
7 $query =~ s/\?//g; | |
8 | |
9 if ($query eq $cookie) { | |
10 print "Content-type: application/octet-stream\n"; | |
11 print "Cache-control: no-cache, no-store\n\n"; | |
12 open FH, "<../../../../resources/Ahem.ttf" or die; | |
13 binmode FH; | |
14 binmode STDOUT; | |
15 while (<FH>) { print; } | |
16 close FH; | |
17 } else { | |
18 print "Content-type: text/html\n"; | |
19 print "Cache-control: no-cache, no-store\n\n"; | |
20 print "<body>FAIL: Cookie:" . $cookie .", Query:" . $query . "</body>"; | |
21 } | |
OLD | NEW |