lib/setuplib MDL-20166 - Don't abort install on nginx webserver

Thanks to Jordan for the patch. Jordan has done testing and found nginx
seems to work and is planning to do more extensive testing to alert us of
other problems along the way.
This commit is contained in:
poltawski
2009-08-27 07:52:11 +00:00
parent 9c48f05caf
commit 7e13a2654a
+5
View File
@@ -493,6 +493,11 @@ function setup_get_remote_url() {
$rurl['scheme'] = empty($_SERVER['HTTPS']) ? 'http' : 'https';
$rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded
} else if (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {
//nginx
$rurl['scheme'] = empty($_SERVER['HTTPS']) ? 'http' : 'https';
$rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded
} else if (stripos($_SERVER['SERVER_SOFTWARE'], 'iis') !== false) {
//IIS
$rurl['scheme'] = ($_SERVER['HTTPS'] == 'off') ? 'http' : 'https';