Index: LayoutTests/http/tests/security/resources/green-if-cors-anonymous.php |
diff --git a/LayoutTests/http/tests/security/resources/green-if-cors-anonymous.php b/LayoutTests/http/tests/security/resources/green-if-cors-anonymous.php |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7553fe0c8e7b0a4c266f614f00ad5e8dbe7df134 |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/resources/green-if-cors-anonymous.php |
@@ -0,0 +1,15 @@ |
+<?php |
+if (isset($_SERVER['HTTP_ORIGIN']) && !isset($_COOKIE['cookie'])) { |
+ header("Access-Control-Allow-Origin: *"); |
+ $name = 'green-background.css'; |
+} else { |
+ $name = 'red-background.css'; |
+} |
+ |
+$fp = fopen($name, 'rb'); |
+header("Content-Type: text/css"); |
+header("Content-Length: " . filesize($name)); |
+ |
+fpassthru($fp); |
+exit; |
+?> |