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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/resources/mixed-range-response.php

Issue 1356353003: Relax cross-origin partial response requirements for CORS presence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert accidental php change. Created 5 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/media/resources/mixed-range-response.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/resources/mixed-range-response.php b/third_party/WebKit/LayoutTests/http/tests/media/resources/mixed-range-response.php
index 6d6dbd927e6d1626b2cb5ffa3773293470bb46bb..a6581d706db8f6fc80ec5b2f7820516c1f422906 100644
--- a/third_party/WebKit/LayoutTests/http/tests/media/resources/mixed-range-response.php
+++ b/third_party/WebKit/LayoutTests/http/tests/media/resources/mixed-range-response.php
@@ -1,6 +1,9 @@
<?php
if (isset($_SERVER['HTTP_RANGE']) && ($_SERVER['HTTP_RANGE'] == 'bytes=0-')) {
header('HTTP/1.0 206 Partial Content');
+ if (isset($_GET['cors_allow_origin'])) {
+ header("Access-Control-Allow-Origin: " . $_GET['cors_allow_origin']);
+ }
header('Content-Type: audio/ogg');
# 12983 is the file size of media/content/silence.oga.
header('Content-Range: bytes 0-2/12983');
@@ -9,4 +12,7 @@ if (isset($_SERVER['HTTP_RANGE']) && ($_SERVER['HTTP_RANGE'] == 'bytes=0-')) {
}
header('HTTP/1.1 307 Temporary Redirect');
header('Location: ' . $_GET["location"]);
+if (isset($_GET['cors_allow_origin'])) {
+ header("Access-Control-Allow-Origin: " . $_GET['cors_allow_origin']);
+}
?>

Powered by Google App Engine
This is Rietveld 408576698