mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge branch 'ticket/bantu/9609' into develop-olympus
* ticket/bantu/9609: [ticket/9609] Change header() calls setting HTTP status to send_status_line().
This commit is contained in:
@@ -3753,7 +3753,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
}
|
||||
|
||||
// Do not send 200 OK, but service unavailable on errors
|
||||
header('HTTP/1.1 503 Service Unavailable');
|
||||
send_status_line(503, 'Service Unavailable');
|
||||
|
||||
garbage_collection();
|
||||
|
||||
@@ -4223,7 +4223,8 @@ function phpbb_http_login($param)
|
||||
}
|
||||
else if ($auth_result['status'] == LOGIN_ERROR_ATTEMPTS)
|
||||
{
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
send_status_line(401, 'Unauthorized');
|
||||
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
}
|
||||
@@ -4235,7 +4236,7 @@ function phpbb_http_login($param)
|
||||
$param['auth_message'] = preg_replace('/[\x80-\xFF]/', '?', $param['auth_message']);
|
||||
|
||||
header('WWW-Authenticate: Basic realm="' . $param['auth_message'] . '"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
send_status_line(401, 'Unauthorized');
|
||||
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
@@ -748,7 +748,7 @@ class session
|
||||
|
||||
if ((int) $row['sessions'] > (int) $config['active_sessions'])
|
||||
{
|
||||
header('HTTP/1.1 503 Service Unavailable');
|
||||
send_status_line(503, 'Service Unavailable');
|
||||
trigger_error('BOARD_UNAVAILABLE');
|
||||
}
|
||||
}
|
||||
@@ -1821,7 +1821,7 @@ class user extends session
|
||||
{
|
||||
if ($this->data['is_bot'])
|
||||
{
|
||||
header('HTTP/1.1 503 Service Unavailable');
|
||||
send_status_line(503, 'Service Unavailable');
|
||||
}
|
||||
|
||||
$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
|
||||
@@ -1840,7 +1840,7 @@ class user extends session
|
||||
{
|
||||
if ($this->data['is_bot'])
|
||||
{
|
||||
header('HTTP/1.1 503 Service Unavailable');
|
||||
send_status_line(503, 'Service Unavailable');
|
||||
}
|
||||
trigger_error('BOARD_UNAVAILABLE');
|
||||
}
|
||||
|
Reference in New Issue
Block a user