Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: LayoutTests/http/tests/webfont/resources/cookie-match.cgi

Issue 1267023004: WebFonts: Send credentials for same origin requests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: windows test fix Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>";
+}

Powered by Google App Engine
This is Rietveld 408576698