Chromium Code Reviews| Index: LayoutTests/http/tests/webfont/resources/cookie-match.cgi |
| diff --git a/LayoutTests/http/tests/webfont/resources/cookie-match.cgi b/LayoutTests/http/tests/webfont/resources/cookie-match.cgi |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..0b18147c073e7bb653b8d15599d929ba2518493d |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/webfont/resources/cookie-match.cgi |
| @@ -0,0 +1,21 @@ |
| +#!/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.
|
| +use strict; |
| + |
| +my $query = $ENV{"QUERY_STRING"}; |
| +my $cookie = $ENV{"HTTP_COOKIE"}; |
| + |
| +$query =~ s/\?//g; |
| + |
| +if ($query eq $cookie) { |
| + print "Content-type: application/octet-stream\n"; |
| + print "Cache-control: no-cache, no-store\n\n"; |
| + open FH, "<../../../../resources/Ahem.ttf" or die; |
| + binmode FH; |
| + binmode STDOUT; |
| + while (<FH>) { print; } |
| + close FH; |
| +} else { |
| + print "Content-type: text/html\n"; |
| + print "Cache-control: no-cache, no-store\n\n"; |
| + print "<body>FAIL: Cookie:" . $cookie .", Query:" . $query . "</body>"; |
| +} |