| Index: LayoutTests/http/tests/security/resources/img-basic-auth.php
|
| diff --git a/LayoutTests/http/tests/security/resources/img-basic-auth.php b/LayoutTests/http/tests/security/resources/img-basic-auth.php
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3f60617c7ff8e76bfef971ad5f60cf44e85f2e36
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/security/resources/img-basic-auth.php
|
| @@ -0,0 +1,15 @@
|
| +<?php
|
| +if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_REQUEST['uid']) || $_REQUEST['uid'] != $_SERVER['PHP_AUTH_USER']) {
|
| + header('WWW-Authenticate: Basic realm="blink test realm"');
|
| + header('HTTP/1.0 401 Unauthorized');
|
| + echo 'Authentication cancelled.';
|
| +} else {
|
| + header("Access-Control-Allow-Origin: *");
|
| + $name = 'abe.png';
|
| + $fp = fopen($name, 'rb');
|
| + header("Content-Type: image/png");
|
| + header("Content-Length: " . filesize($name));
|
| + header('HTTP/1.0 200 OK');
|
| + fpassthru($fp);
|
| +}
|
| +?>
|
|
|