function session_test_drupal_goto_alter in Drupal 7
Implements hook_drupal_goto_alter().
Force the redirection to go to a non-secure page after being on a secure page through https.php.
File
- modules/
simpletest/ tests/ session_test.module, line 190
Code
function session_test_drupal_goto_alter(&$path, &$options, &$http_response_code) {
global $base_insecure_url, $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 . '/' . $path;
}
}