From 0e861ac3ab0513ec1c00354bfc8fc8492aa6573c Mon Sep 17 00:00:00 2001
From: Oleg Pudeyev <oleg@bsdpower.com>
Date: Wed, 9 Feb 2011 02:14:46 -0500
Subject: [PATCH] [ticket/10029] Use $_SERVER['SERVER_PROTOCOL'] for
 determining HTTP version.

PHPBB3-10029
---
 phpBB/includes/functions.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 9a8cc5d6b3..398a02380b 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2631,8 +2631,14 @@ function send_status_line($code, $message)
 	}
 	else
 	{
-		if (isset($_SERVER['HTTP_VERSION']))
+		if (!empty($_SERVER['SERVER_PROTOCOL']))
 		{
+			$version = $_SERVER['SERVER_PROTOCOL'];
+		}
+		else if (!empty($_SERVER['HTTP_VERSION']))
+		{
+			// I cannot remember where I got this from.
+			// This code path may never be reachable in reality.
 			$version = $_SERVER['HTTP_VERSION'];
 		}
 		else