Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/redirect.php

Issue 2421093003: Allow redirects for requests that require preflight. (Closed)
Patch Set: Rebase on custom headers CL Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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']);

Powered by Google App Engine
This is Rietveld 408576698