From 002806b16c132d571196607315ba822f977b3ef6 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 21 Nov 2006 19:39:38 +1300 Subject: [PATCH] Reorder calls to header, and send return code (although this is php 4.3+ it should be OK). --- inc/BasicAuthSession.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/BasicAuthSession.php b/inc/BasicAuthSession.php index 1b02a1da..f163b276 100644 --- a/inc/BasicAuthSession.php +++ b/inc/BasicAuthSession.php @@ -59,8 +59,8 @@ class BasicAuthSession { } if (!isset($_SERVER['PHP_AUTH_USER'])) { + header('HTTP/1.0 401 Unauthorized', true, 401 ); header( sprintf( 'WWW-Authenticate: Basic realm="%s"', $c->system_name) ); - header('HTTP/1.0 401 Unauthorized'); echo 'Please log in for access to this system.'; dbg_error_log( "BasicAuth", ":Session: User is not authorised" ); exit;