diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-11-14 02:15:56 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-11-14 02:35:29 +0300 |
commit | 33b4f8f6d119ee98f50e89b06e6ef9a1e467aa64 (patch) | |
tree | d39e0a7ff8d12340bc312025ad755e1bf8eec3b7 /core | |
parent | 25aace1fb7bf949e2ac18a3ab0e84e84e1d91596 (diff) |
refs #6661 in case value is empty set a default
Diffstat (limited to 'core')
-rw-r--r-- | core/Common.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/Common.php b/core/Common.php index dd46ada0de..8068f96d79 100644 --- a/core/Common.php +++ b/core/Common.php @@ -1177,15 +1177,16 @@ class Common if (strpos(PHP_SAPI, '-fcgi') === false) { $key = $_SERVER['SERVER_PROTOCOL']; + + if (strlen($key) > 15 || empty($key)) { + $key = 'HTTP/1.1'; + } + } else { // FastCGI $key = 'Status:'; } - if (strlen($key) > 11 || 0 !== strpos(strtolower($key), 'http')) { - $key = 'HTTP/1.1'; - } - $message = $messages[$code]; Common::sendHeader($key . ' ' . $code . ' ' . $message); } |