summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2011-10-27 15:16:55 (GMT)
committerwebchick2011-10-27 15:16:55 (GMT)
commita91e6a8938ae43a3b186e11dd5cda4ed7a6a3571 (patch)
treefff4e6425962ab1280fa5a70c5d280f421898fc7
parenta7c925997914768932efe77b82f0a0beca4c7d4c (diff)
Issue #673020 follow-up by attiks: Critical fix to Content-Language HTTP header to not cause issues with Drush.
-rw-r--r--includes/bootstrap.inc4
-rw-r--r--includes/common.inc4
2 files changed, 4 insertions, 4 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 29e5c3a..22a2e97 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -2561,7 +2561,6 @@ function get_t() {
* Initialize all the defined language types.
*/
function drupal_language_initialize() {
- global $language;
$types = language_types();
// Ensure the language is correctly returned, even without multilanguage
@@ -2581,9 +2580,6 @@ function drupal_language_initialize() {
// environments.
bootstrap_invoke_all('language_init');
}
-
- // Send appropriate HTTP-Header for browsers and search engines.
- header('Content-Language: ' . $language->language);
}
/**
diff --git a/includes/common.inc b/includes/common.inc
index c851715..9b0a737 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2467,6 +2467,10 @@ function drupal_deliver_html_page($page_callback_result) {
drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
}
+ // Send appropriate HTTP-Header for browsers and search engines.
+ global $language;
+ drupal_add_http_header('Content-Language', $language->language);
+
// Menu status constants are integers; page content is a string or array.
if (is_int($page_callback_result)) {
// @todo: Break these up into separate functions?