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

Side by Side Diff: LayoutTests/http/tests/security/resources/green-if-cors-credentialed.php

Issue 1011103002: Allow cross-origin cssRules access to CORS-fetched stylesheet. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: compile fix.. Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 <?php 1 <?php
2 2 if (isset($_SERVER['HTTP_ORIGIN']) && $_COOKIE['cookie'] != '') {
3 if (isset($_GET['with_credentials'])) { 3 header("Access-Control-Allow-Origin: *");
4 header("Access-Control-Allow-Origin: http://127.0.0.1:8000");
5 header("Access-Control-Allow-Credentials: true"); 4 header("Access-Control-Allow-Credentials: true");
5 $name = 'green-background.css';
6 } else { 6 } else {
7 header("Access-Control-Allow-Origin: *"); 7 $name = 'red-background.css';
8 } 8 }
9 9
10 $name = 'laughter.wav';
11 $fp = fopen($name, 'rb'); 10 $fp = fopen($name, 'rb');
12 11 header("Content-Type: text/css");
13 header("Content-Type: audio/x-wav");
14 header("Content-Length: " . filesize($name)); 12 header("Content-Length: " . filesize($name));
15 13
16 fpassthru($fp); 14 fpassthru($fp);
17 exit; 15 exit;
18 ?> 16 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698