diff --git a/route.php b/route.php index 6686518..b03fd9d 100644 --- a/route.php +++ b/route.php @@ -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 " \n"; require ("domframework/renderer.php");