summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-06-10 06:51:38 +0000
committerDries Buytaert <dries@buytaert.net>2010-06-10 06:51:38 +0000
commita9af3a61cfb2bb1d0d57f156a3f52f8233b0af4a (patch)
tree3ad4bb779086d00b4773a94fa7235ae82b518d63
parentba8910eb9eb44bc5e595663c72eabd96c8b6a0b0 (diff)
downloadbrdo-a9af3a61cfb2bb1d0d57f156a3f52f8233b0af4a.tar.gz
brdo-a9af3a61cfb2bb1d0d57f156a3f52f8233b0af4a.tar.bz2
- Patch #823500 by justinrandell, chx: () should always reflect ['HTTPS'] even if () is http.
-rw-r--r--includes/bootstrap.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 0bcd8dc1a..23c814a6e 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -566,6 +566,7 @@ function drupal_settings_initialize() {
if (file_exists(DRUPAL_ROOT . '/' . conf_path() . '/settings.php')) {
include_once DRUPAL_ROOT . '/' . conf_path() . '/settings.php';
}
+ $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
if (isset($base_url)) {
// Parse fixed base URL from settings.php.
@@ -580,7 +581,7 @@ function drupal_settings_initialize() {
}
else {
// Create base URL
- $http_protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
+ $http_protocol = $is_https ? 'https' : 'http';
$base_root = $http_protocol . '://' . $_SERVER['HTTP_HOST'];
$base_url = $base_root;
@@ -596,7 +597,6 @@ function drupal_settings_initialize() {
$base_path = '/';
}
}
- $is_https = $http_protocol == 'https';
$base_secure_url = str_replace('http://', 'https://', $base_url);
$base_insecure_url = str_replace('https://', 'http://', $base_url);