From 05c39fe7a04607ed2fdb07c01f4e24de3c0f9056 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 10 Jun 2009 20:00:10 +0000 Subject: - Patch #487830 by c960657: fixed a HTTP header and improved the tests. --- includes/bootstrap.inc | 6 ++++-- includes/common.inc | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'includes') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index b11a8c880..86d80dbdd 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1403,8 +1403,10 @@ function _drupal_bootstrap($phase) { } // Prepare for non-cached page workflow. - ob_start(); - drupal_page_header(); + if ($_SERVER['SERVER_SOFTWARE'] !== 'PHP CLI') { + ob_start(); + drupal_page_header(); + } break; case DRUPAL_BOOTSTRAP_LANGUAGE: diff --git a/includes/common.inc b/includes/common.inc index e4400995e..e1e2053d6 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -834,7 +834,7 @@ function _drupal_log_error($error, $fatal = FALSE) { } if ($fatal) { - drupal_set_header($_SERVER['SERVER_PROTOCOL'] . ' 500 Service unavailable (with message)'); + drupal_set_header('500 Service unavailable (with message)'); } if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { -- cgit v1.2.3