From 33b4f8f6d119ee98f50e89b06e6ef9a1e467aa64 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Fri, 14 Nov 2014 00:15:56 +0100 Subject: refs #6661 in case value is empty set a default --- core/Common.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core') 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); } -- cgit v1.2.3