diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index bd28d41..b442aae 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -1070,7 +1070,7 @@ function drupal_load($type, $name) { * @param $append * Whether to append the value to an existing header or to replace it. * - * @deprecated + * @deprecated Header handling is being shifted to a Symfony response object. */ function drupal_add_http_header($name, $value, $append = FALSE) { // The headers as name/value pairs. @@ -1103,7 +1103,7 @@ function drupal_add_http_header($name, $value, $append = FALSE) { * A string containing the header value, or FALSE if the header has been set, * or NULL if the header has not been set. * - * @deprecated + * @deprecated Header handling is being shifted to a Symfony response object. */ function drupal_get_http_header($name = NULL) { $headers = &drupal_static('drupal_http_headers', array()); @@ -1122,7 +1122,7 @@ function drupal_get_http_header($name = NULL) { * Header names are case-insensitive, but for maximum compatibility they should * follow "common form" (see RFC 2616, section 4.2). * - * @deprecated + * @deprecated Header handling is being shifted to a Symfony response object. */ function _drupal_set_preferred_header_name($name = NULL) { static $header_names = array(); @@ -1145,7 +1145,7 @@ function _drupal_set_preferred_header_name($name = NULL) { * (optional) If TRUE and headers have already been sent, send only the * specified headers. * - * @deprecated + * @deprecated Header handling is being shifted to a Symfony response object. */ function drupal_send_headers($default_headers = array(), $only_default = FALSE) { $headers_sent = &drupal_static(__FUNCTION__, FALSE); @@ -1201,7 +1201,7 @@ function drupal_send_headers($default_headers = array(), $only_default = FALSE) * * @see drupal_page_set_cache() * - * @deprecated + * @deprecated Header handling is being shifted to a Symfony response object. */ function drupal_page_header() { $headers_sent = &drupal_static(__FUNCTION__, FALSE); diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index 5e362f1..14c85d1 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -56,6 +56,9 @@ /** * Indicates that headers should be dumped if verbose output is enabled. * + * Headers are dumped to verbose by drupalGet(), drupalHead(), and + * drupalPost(). + * * @var bool */ protected $dumpHeaders = FALSE; @@ -1386,10 +1389,16 @@ protected function drupalPost($path, $edit, $submit, array $options = array(), a if ($new = $this->checkForMetaRefresh()) { $out = $new; } - $this->verbose('POST request to: ' . $path . - '
Ending URL: ' . $this->getUrl() . - '
Fields: ' . highlight_string('' . $out); + + $verbose = 'POST request to: ' . $path; + $verbose .= '
Ending URL: ' . $this->getUrl(); + if ($this->dumpHeaders) { + $verbose .= '
Headers:
' . check_plain(var_export(array_map('trim', $this->headers), TRUE)) . '
'; + } + $verbose .= '
Fields: ' . highlight_string('' . $out; + + $this->verbose($verbose); return $out; } } diff --git a/core/modules/system/lib/Drupal/system/Tests/Update/UpdateScriptTest.php b/core/modules/system/lib/Drupal/system/Tests/Update/UpdateScriptTest.php index 2bb96b9..b0e255e 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Update/UpdateScriptTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Update/UpdateScriptTest.php @@ -21,6 +21,8 @@ class UpdateScriptTest extends WebTestBase { */ public static $modules = array('update_script_test', 'dblog'); + protected $dumpHeaders = TRUE; + private $update_url; private $update_user; diff --git a/core/update.php b/core/update.php index cee23c4..6e85b0f 100644 --- a/core/update.php +++ b/core/update.php @@ -302,6 +302,7 @@ function update_info_page() { */ function update_access_denied_page() { drupal_add_http_header('Status', '403 Forbidden'); + header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden'); watchdog('access denied', 'update.php', NULL, WATCHDOG_WARNING); drupal_set_title('Access denied'); return '

Access denied. You are not authorized to access this page. Log in using either an account with the administer software updates permission or the site maintenance account (the account you created during installation). If you cannot log in, you will have to edit settings.php to bypass this access check. To do this: