route : when a 401 error is thrown, request the WWW-Authentication

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2377 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-10-25 14:48:21 +00:00
parent 67b1d771ac
commit d52e9432f4

View File

@@ -520,6 +520,12 @@ class route
$http = new http ();
@header ($_SERVER["SERVER_PROTOCOL"]." $getCode ".
$http->codetext ($getCode));
if ($getCode === 401)
{
// When using the 401 "Authentication required", it must be an
// information provided to the caller. Just add it.
@header("WWW-Authenticate: Basic realm=\"Authentication needed\"");
}
// TODO : If the output is HTML, add the header line :
// echo " <meta name='ROBOTS' content='NOINDEX, NOFOLLOW'>\n";
require ("domframework/renderer.php");