diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index d33d1ee..d5c2654 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -432,7 +432,6 @@ function _drupal_request_initialize() { global $base_url, $cookie_domain; // Set and derived from $base_url by this function. global $base_path, $base_root, $script_path; - global $base_secure_url, $base_insecure_url; $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; @@ -472,8 +471,6 @@ function _drupal_request_initialize() { $base_path = '/'; } } - $base_secure_url = str_replace('http://', 'https://', $base_url); - $base_insecure_url = str_replace('https://', 'http://', $base_url); // Determine the path of the script relative to the base path, and add a // trailing slash. This is needed for creating URLs to Drupal pages. diff --git a/core/modules/system/lib/Drupal/system/Tests/Session/SessionHttpsTest.php b/core/modules/system/lib/Drupal/system/Tests/Session/SessionHttpsTest.php index 858da22..af153dd 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Session/SessionHttpsTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Session/SessionHttpsTest.php @@ -319,11 +319,11 @@ protected function assertSessionIds($sid, $ssid, $assertion_text) { * A Drupal path such as 'user'. * * @return - * An absolute URL. + * The URL prepared in a way such that the https.php mock front controller + * is used. */ protected function httpsUrl($url) { - global $base_url; - return $base_url . '/core/modules/system/tests/https.php/' . $url; + return 'core/modules/system/tests/https.php/' . $url; } /** @@ -333,11 +333,11 @@ protected function httpsUrl($url) { * A Drupal path such as 'user'. * * @return - * An absolute URL. + * The URL prepared in a way such that the http.php mock front controller is + * used. */ protected function httpUrl($url) { - global $base_url; - return $base_url . '/core/modules/system/tests/http.php/' . $url; + return 'core/modules/system/tests/http.php/' . $url; } } diff --git a/core/modules/system/tests/modules/session_test/lib/Drupal/session_test/EventSubscriber/SessionTestSubscriber.php b/core/modules/system/tests/modules/session_test/lib/Drupal/session_test/EventSubscriber/SessionTestSubscriber.php index 55225ae..4be74ae 100644 --- a/core/modules/system/tests/modules/session_test/lib/Drupal/session_test/EventSubscriber/SessionTestSubscriber.php +++ b/core/modules/system/tests/modules/session_test/lib/Drupal/session_test/EventSubscriber/SessionTestSubscriber.php @@ -49,12 +49,12 @@ public function onKernelResponseSessionTest(FilterResponseEvent $event) { if ($response instanceOf RedirectResponse) { // Force the redirection to go to a non-secure page after being on a // secure page through https.php. - global $base_insecure_url, $is_https_mock; + global $is_https_mock; // Alter the redirect to use HTTP when using a mock HTTPS request through // https.php because form submissions would otherwise redirect to a // non-existent HTTPS site. if (!empty($is_https_mock)) { - $path = $base_insecure_url . '/' . $response->getTargetUrl(); + str_replace('https://', 'http://', $response->getTargetUrl()); $response->setTargetUrl($path); } }