--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/cors/submitted/webkit/resources/access-control-basic-non-get-allow.php Thu May 03 15:20:10 2012 -0700
@@ -0,0 +1,21 @@
+<?PHP
+
+if ($_SERVER['REQUEST_METHOD'] == "OPTIONS") {
+ header("Content-Type: text/plain");
+ header("Access-Control-Allow-Credentials: true");
+ header("Access-Control-Allow-Methods: PUT");
+ header("Access-Control-Allow-Origin: " . $_SERVER['HTTP_ORIGIN']);
+} elseif ($_SERVER['REQUEST_METHOD'] == "PUT") {
+ header("Content-Type: text/plain");
+ header("Access-Control-Allow-Credentials: true");
+ header("Access-Control-Allow-Origin: " . $_SERVER['HTTP_ORIGIN']);
+
+ echo "PASS: Cross-domain access allowed.\n";
+ $request_body = @file_get_contents('php://input');
+ echo $request_body ;
+} else {
+ header("Content-Type: text/plain");
+ echo "Wrong method: " . $_SERVER['REQUEST_METHOD'] . "\n";
+}
+
+?>