Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/redirect.php |
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/redirect.php b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/redirect.php |
index af37c0d6857da4677f4b377949d63b3ecfa2c73a..1ab1e2641e33fff89ab8b2401a7563218a95d086 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/redirect.php |
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/redirect.php |
@@ -1,12 +1,14 @@ |
<?php |
-if (isset($_GET['Status'])) { |
- header ("HTTP/1.1 " . $_GET["Status"]); |
-} else { |
- header ("HTTP/1.1 302"); |
-} |
-$url = $_GET['Redirect']; |
-if ($url != "noLocation") { |
- header("Location: $url"); |
+if ($_SERVER['REQUEST_METHOD'] !== 'OPTIONS') { |
yhirano
2016/11/22 04:05:23
Sorry, I don't understand the intention of this ch
Jack Bates
2016/11/22 18:24:17
Without this, it sends a redirect response to the
|
+ $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']); |