From a9af3a61cfb2bb1d0d57f156a3f52f8233b0af4a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 10 Jun 2010 06:51:38 +0000 Subject: - Patch #823500 by justinrandell, chx: () should always reflect ['HTTPS'] even if () is http. --- includes/bootstrap.inc | 4 ++-- 1 file 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); -- cgit v1.2.3