summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-01-31 16:40:55 +0100
committerAndrey Andreev <narf@devilix.net>2015-01-31 16:40:55 +0100
commit7a5e3da936ffaab0ebd7d07dbf5e3737ff91c440 (patch)
tree183a14bd96e9a6537c363db53388603e5b16927a /system/core
parent2eb580cff726160f737da2e36ebae7e60d676e30 (diff)
parent01daaca3551ff1e6a06fa895afcb836fd2cda4bf (diff)
Merge pull request #3540 from bjjay/bjjay-patch-1
Reduce once server protocol check
Diffstat (limited to 'system/core')
-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);
}
}
}