$OpenBSD: patch-index_php,v 1.5 2015/10/15 18:42:08 robert Exp $
--- index.php.orig	Wed Sep 30 19:10:44 2015
+++ index.php	Thu Oct 15 20:41:21 2015
@@ -130,6 +130,22 @@ if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', '
 include_once(ZPUSH_CONFIG);
 include_once('version.php');
 
+// Define apache_request_headers() in case we are using nginx or lighttpd
+// as a webserver and not apache.
+if (!function_exists("apache_request_headers")) {
+	function apache_request_headers() {
+		$headers = array();
+		foreach ($_SERVER as $key => $value) {
+			if (substr($key, 0, 5) != 'HTTP_') {
+				continue;
+			}
+			$headername = strtr(ucwords(strtolower(strtr(substr($key, 5), '_', ' '))), ' ', '-');
+			$headers[$headername] = $value;
+		}
+
+		return $headers;
+	}
+}
 
     // Attempt to set maximum execution time
     ini_set('max_execution_time', SCRIPT_TIMEOUT);
@@ -299,4 +315,4 @@ include_once('version.php');
 
     // end gracefully
     ZLog::WriteEnd();
-?>
\ No newline at end of file
+?>
