Index: LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-invalid-status.php |
diff --git a/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-invalid-status.php b/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-invalid-status.php |
new file mode 100755 |
index 0000000000000000000000000000000000000000..8333aaec3fea187e04e70089ce46c3d1385a4b59 |
--- /dev/null |
+++ b/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-invalid-status.php |
@@ -0,0 +1,23 @@ |
+<?php |
+ $code = $_GET['code']; |
+ $request_origin_value = $_SERVER["HTTP_ORIGIN"]; |
+ $access_control_request_headers = $_SERVER["HTTP_ACCESS_CONTROL_REQUEST_HEADERS"]; |
+ |
+ if ($_SERVER['REQUEST_METHOD'] == "OPTIONS") { |
+ if ($code == "400") { |
+ header("HTTP/1.1 400"); |
+ } |
+ else if ($code == "501"){ |
+ header("HTTP/1.1 501"); |
+ } |
+ header("Access-Control-Allow-Methods: GET"); |
+ header("Access-Control-Max-Age: 1"); |
+ } else { |
+ header("HTTP/1.1 200"); |
+ } |
+ if (!is_null($request_origin_value)) { |
+ header("Access-Control-Allow-Origin: $request_origin_value"); |
+ } |
+ if (!is_null($access_control_request_headers)) |
+ header("Access-Control-Allow-Headers: $access_control_request_headers"); |
+?> |