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

Unified Diff: LayoutTests/http/tests/resources/redirect.php

Issue 345813005: Rework EventSource CORS tests to be usable from Workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Generalize redirect.php?cors_enabled to cors_allow_origin Created 6 years, 6 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
« no previous file with comments | « LayoutTests/http/tests/eventsource/workers/eventsource-csp-redirect-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/resources/redirect.php
diff --git a/LayoutTests/http/tests/resources/redirect.php b/LayoutTests/http/tests/resources/redirect.php
index cfeb37d1c56f4e24fde8f2bb07ad4c4a15cf0f83..08d274509d7bc95157c3110059f26730c7916c62 100644
--- a/LayoutTests/http/tests/resources/redirect.php
+++ b/LayoutTests/http/tests/resources/redirect.php
@@ -1,16 +1,19 @@
<?php
$url = $_GET['url'];
$refresh = $_GET['refresh'];
-
+
if (isset($refresh)) {
header("HTTP/1.1 200");
header("Refresh: $refresh; url=$url");
return;
}
+ header("Location: $url");
+ if (isset($_GET['cors_allow_origin']))
+ header("Access-Control-Allow-Origin: " . $_GET['cors_allow_origin']);
+
$code = $_GET['code'];
if (!isset($code))
$code = 302;
header("HTTP/1.1 $code");
- header("Location: $url");
?>
« no previous file with comments | « LayoutTests/http/tests/eventsource/workers/eventsource-csp-redirect-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698