diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/bootstrap.inc | 4 |
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); |