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

Side by Side Diff: LayoutTests/http/tests/security/resources/img-basic-auth.php

Issue 450263002: Test <img crossorigin> handling of 401 responses. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <?php
2 if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_REQUEST['uid']) || $_REQUEST[' uid'] != $_SERVER['PHP_AUTH_USER']) {
3 header('WWW-Authenticate: Basic realm="blink test realm"');
4 header('HTTP/1.0 401 Unauthorized');
5 echo 'Authentication cancelled.';
6 } else {
7 header("Access-Control-Allow-Origin: *");
8 $name = 'abe.png';
9 $fp = fopen($name, 'rb');
10 header("Content-Type: image/png");
11 header("Content-Length: " . filesize($name));
12 header('HTTP/1.0 200 OK');
13 fpassthru($fp);
14 }
15 ?>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698