summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbjjay <fris@vip.qq.com>2015-01-31 15:29:50 +0100
committerbjjay <fris@vip.qq.com>2015-01-31 15:29:50 +0100
commit01daaca3551ff1e6a06fa895afcb836fd2cda4bf (patch)
tree183a14bd96e9a6537c363db53388603e5b16927a
parent2eb580cff726160f737da2e36ebae7e60d676e30 (diff)
Reduce once server protocol check
-rw-r--r--system/core/Common.php5
1 files changed, 2 insertions, 3 deletions
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);
}
}
}