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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php

Issue 2421093003: Allow redirects for requests that require preflight. (Closed)
Patch Set: Layout tests Created 4 years, 2 months 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/fetch-access-control.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php
index 4ff7b75a982040aaa2e7b9a2a20038135e524127..908b2b03a416febfdde2fc4a47a87008441d8087 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php
@@ -31,6 +31,17 @@ if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS' && isset($_GET['PreflightTest'])) {
header("HTTP/1.1 {$_GET['PreflightTest']}");
}
+if (isset($_GET['Redirect'])) {
+ 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 (isset($_GET[$prefix . 'ACAOrigin'])) {
$origins = explode(',', $_GET[$prefix . 'ACAOrigin']);
for ($i = 0; $i < sizeof($origins); ++$i)
@@ -109,4 +120,4 @@ $arr = array('jsonpResult' => 'success',
'cookie' => $cookie);
$json = json_encode($arr);
echo "report( $json );";
-?>
+?>

Powered by Google App Engine
This is Rietveld 408576698