From 01daaca3551ff1e6a06fa895afcb836fd2cda4bf Mon Sep 17 00:00:00 2001 From: bjjay Date: Sat, 31 Jan 2015 22:29:50 +0800 Subject: Reduce once server protocol check --- system/core/Common.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'system/core/Common.php') diff --git a/system/core/Common.php b/system/core/Common.php index 5c5672e99..c3198b31f 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -555,15 +555,14 @@ if ( ! function_exists('set_status_header')) } } - $server_protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : FALSE; - if (strpos(PHP_SAPI, 'cgi') === 0) { header('Status: '.$code.' '.$text, TRUE); } else { - header(($server_protocol ? $server_protocol : 'HTTP/1.1').' '.$code.' '.$text, TRUE, $code); + $server_protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1'; + header($server_protocol.' '.$code.' '.$text, TRUE, $code); } } } -- cgit v1.2.3-24-g4f1b