diff options
| author | Igor Wiedler <igor@wiedler.ch> | 2010-09-16 22:24:49 +0200 |
|---|---|---|
| committer | Igor Wiedler <igor@wiedler.ch> | 2010-09-16 22:24:49 +0200 |
| commit | 6b5d5e1f63fc18e190afd17364701d9d690fe1a5 (patch) | |
| tree | 3c06e906d5cd48d13492cfe181431028b5bab4f5 /phpBB/includes | |
| parent | d874c3237498feb7729b23ee17248981ee3faadc (diff) | |
| parent | bef108a5cc1cc80068f7066b5c18c5631b8dbc32 (diff) | |
| download | forums-6b5d5e1f63fc18e190afd17364701d9d690fe1a5.tar forums-6b5d5e1f63fc18e190afd17364701d9d690fe1a5.tar.gz forums-6b5d5e1f63fc18e190afd17364701d9d690fe1a5.tar.bz2 forums-6b5d5e1f63fc18e190afd17364701d9d690fe1a5.tar.xz forums-6b5d5e1f63fc18e190afd17364701d9d690fe1a5.zip | |
Merge branch 'ticket/bantu/9609' into develop-olympus
* ticket/bantu/9609:
[ticket/9609] Change header() calls setting HTTP status to send_status_line().
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/functions.php | 7 | ||||
| -rw-r--r-- | phpBB/includes/session.php | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index c4ff998e69..91edddf5d2 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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'); } diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 79023cc7bc..aa2293c630 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -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'); } |
