34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
$OpenBSD: patch-index_php,v 1.2 2012/06/24 18:47:20 ajacoutot Exp $
|
|
--- index.php.orig Thu Jun 7 23:29:14 2012
|
|
+++ index.php Thu Jun 21 18:17:51 2012
|
|
@@ -111,6 +111,22 @@ include_once('lib/request/requestprocessor.php');
|
|
include_once('config.php');
|
|
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);
|
|
@@ -277,4 +293,4 @@ include_once('version.php');
|
|
|
|
// end gracefully
|
|
ZLog::Write(LOGLEVEL_DEBUG, '-------- End');
|
|
-?>
|
|
\ No newline at end of file
|
|
+?>
|