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:
@@ -520,6 +520,12 @@ class route
|
|||||||
$http = new http ();
|
$http = new http ();
|
||||||
@header ($_SERVER["SERVER_PROTOCOL"]." $getCode ".
|
@header ($_SERVER["SERVER_PROTOCOL"]." $getCode ".
|
||||||
$http->codetext ($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 :
|
// TODO : If the output is HTML, add the header line :
|
||||||
// echo " <meta name='ROBOTS' content='NOINDEX, NOFOLLOW'>\n";
|
// echo " <meta name='ROBOTS' content='NOINDEX, NOFOLLOW'>\n";
|
||||||
require ("domframework/renderer.php");
|
require ("domframework/renderer.php");
|
||||||
|
|||||||
Reference in New Issue
Block a user