aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2016-07-05 12:17:28 +0200
committerplegall <plg@piwigo.org>2016-07-05 12:17:28 +0200
commit1f0e95c22c86d8fbc1fd08924602b48130d7ea8a (patch)
treea13cb0158a9cffbc84fe9b6ffa7968ec59de59be
parente580e7d31f082d58e42df68d2c45012b7ab34ad9 (diff)
bug #476, set http code to 401 only when not redirecting
-rw-r--r--include/functions_html.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 5812856a0..5af5c1862 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -279,9 +279,10 @@ function access_denied()
get_root_url().'identification.php?redirect='
.urlencode(urlencode($_SERVER['REQUEST_URI']));
- set_status_header(401);
if ( isset($user) and !is_a_guest() )
{
+ set_status_header(401);
+
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
echo '<div style="text-align:center;">'.l10n('You are not authorized to access the requested page').'<br>';
echo '<a href="'.get_root_url().'identification.php">'.l10n('Identification').'</a>&nbsp;';