| Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7a24a5fe60e2b571fcd08bae43820c0e340eea92
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php
|
| @@ -0,0 +1,29 @@
|
| +<?php
|
| +if ($_SERVER['REQUEST_METHOD'] !== 'OPTIONS') {
|
| + $url = $_GET['Redirect'];
|
| + if ($url != "noLocation") {
|
| + header("Location: $url");
|
| + }
|
| + if (isset($_GET['Status'])) {
|
| + header("HTTP/1.1 " . $_GET["Status"]);
|
| + } else {
|
| + header("HTTP/1.1 302");
|
| + }
|
| +}
|
| +if (isset($_GET['ACAOrigin'])) {
|
| + $origins = explode(',', $_GET['ACAOrigin']);
|
| + for ($i = 0; $i < sizeof($origins); ++$i)
|
| + header("Access-Control-Allow-Origin: " . $origins[$i], false);
|
| +}
|
| +if (isset($_GET['ACAHeaders']))
|
| + header("Access-Control-Allow-Headers: {$_GET['ACAHeaders']}");
|
| +if (isset($_GET['ACAMethods']))
|
| + header("Access-Control-Allow-Methods: {$_GET['ACAMethods']}");
|
| +if (isset($_GET['ACACredentials']))
|
| + header("Access-Control-Allow-Credentials: {$_GET['ACACredentials']}");
|
| +if (isset($_GET['ACEHeaders']))
|
| + header("Access-Control-Expose-Headers: {$_GET['ACEHeaders']}");
|
| +if (isset($_GET['NoRedirectTest'])) {
|
| + echo "report({jsonpResult:'noredirect'});";
|
| +}
|
| +?>
|
|
|