Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / loading / resources / basic-auth-testing.php
blobf6a6f5b1cf15ffacdc598a50a847f4cbe0eabd7e
1 <?php
2 $expectedUsername = isset($_GET['username']) ? $_GET['username'] : 'username';
3 $expectedPassword = isset($_GET['password']) ? $_GET['password'] : 'password';
4 $realm = isset($_GET['realm']) ? $_GET['realm'] : $_SERVER['REQUEST_URI'];
6 header("Cache-Control: no-store");
7 header("Connection: close");
8 if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != $expectedUsername ||
9 !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_PW'] != $expectedPassword) {
10 header("WWW-Authenticate: Basic realm=\"" . $realm . "\"");
11 header('HTTP/1.0 401 Unauthorized');
12 print 'Sent username:password of (' . $_SERVER['PHP_AUTH_USER'] . ':' . $_SERVER['PHP_AUTH_PW'] . ') which is not what was expected';
13 exit;
16 Authenticated as user: <?php print (string)$_SERVER['PHP_AUTH_USER']?> password: <?php print (string)$_SERVER['PHP_AUTH_PW']?>