Reviewed by Darin.
[WebKit-https.git] / LayoutTests / http / tests / xmlhttprequest / resources / basic-auth.php
1 <?php
2   if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_REQUEST['uid']) || ($_REQUEST['uid'] != $_SERVER['PHP_AUTH_USER'])) {
3    header('WWW-Authenticate: Basic realm="WebKit Test Realm"');
4    header('HTTP/1.0 401 Unauthorized');
5    echo 'Authentication canceled';
6    exit;
7   } else {
8    echo "User: {$_SERVER['PHP_AUTH_USER']}, password: {$_SERVER['PHP_AUTH_PW']}.";
9   }
10 ?>