2009-09-05 13:05:31 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
2012-09-02 04:50:06 +00:00
|
|
|
* Fake an HTTPS request, for use during testing.
|
2013-06-06 08:14:16 +00:00
|
|
|
*
|
|
|
|
* @todo Fix this to use a new request rather than modifying server variables,
|
|
|
|
* see http.php.
|
2009-09-05 13:05:31 +00:00
|
|
|
*/
|
|
|
|
|
2009-11-04 05:05:52 +00:00
|
|
|
// Set a global variable to indicate a mock HTTPS request.
|
|
|
|
$is_https_mock = empty($_SERVER['HTTPS']);
|
|
|
|
|
2012-09-02 04:50:06 +00:00
|
|
|
// Change to HTTPS.
|
2009-09-05 13:05:31 +00:00
|
|
|
$_SERVER['HTTPS'] = 'on';
|
|
|
|
foreach ($_SERVER as $key => $value) {
|
2012-04-13 16:05:19 +00:00
|
|
|
$_SERVER[$key] = str_replace('core/modules/system/tests/https.php', 'index.php', $value);
|
2009-09-05 13:05:31 +00:00
|
|
|
$_SERVER[$key] = str_replace('http://', 'https://', $_SERVER[$key]);
|
|
|
|
}
|
|
|
|
|
2010-11-05 19:05:02 +00:00
|
|
|
// Change current directory to the Drupal root.
|
2011-10-31 04:05:57 +00:00
|
|
|
chdir('../../../..');
|
2013-09-02 19:53:23 +00:00
|
|
|
require_once dirname(dirname(dirname(__DIR__))) . '/vendor/autoload.php';
|
2013-03-17 06:36:36 +00:00
|
|
|
require_once dirname(dirname(dirname(__DIR__))) . '/includes/bootstrap.inc';
|
2013-01-02 12:14:56 +00:00
|
|
|
drupal_handle_request(TRUE);
|