Răsfoiți Sursa

Merge branch 'FreshRSS/dev' into dev

Alexandre Alapetite 10 ani în urmă
părinte
comite
70c842031f
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      p/api/greader.php

+ 3 - 0
p/api/greader.php

@@ -46,6 +46,8 @@ function headerVariable($headerName, $varName) {
 	$upName = 'HTTP_' . strtoupper($headerName);
 	if (isset($_SERVER[$upName])) {
 		$header = $_SERVER[$upName];
+	} elseif (isset($_SERVER['REDIRECT_' . $upName])) {
+		$header = $_SERVER['REDIRECT_' . $upName];
 	} elseif (function_exists('getallheaders')) {
 		$ALL_HEADERS = getallheaders();
 		if (isset($ALL_HEADERS[$headerName])) {
@@ -134,6 +136,7 @@ function checkCompatibility() {
 		die('FAIL 64-bit or GMP extension!');
 	}
 	if ((!array_key_exists('HTTP_AUTHORIZATION', $_SERVER)) &&	//Apache mod_rewrite trick should be fine
+		(!array_key_exists('REDIRECT_HTTP_AUTHORIZATION', $_SERVER)) &&	//Apache mod_rewrite with FCGI
 		(empty($_SERVER['SERVER_SOFTWARE']) || (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') === false)) &&	//nginx should be fine
 		(empty($_SERVER['SERVER_SOFTWARE']) || (stripos($_SERVER['SERVER_SOFTWARE'], 'lighttpd') === false)) &&	//lighttpd should be fine
 		((!function_exists('getallheaders')) || (stripos(php_sapi_name(), 'cgi') !== false))) {	//Main problem is Apache/CGI mode