Skip to content

Commit

Permalink
Issue #673020 follow-up by attiks: Critical fix to Content-Language H…
Browse files Browse the repository at this point in the history
…TTP header to not cause issues with Drush.
  • Loading branch information
webchick committed Oct 27, 2011
1 parent 2dd2f4f commit 50fb0be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions includes/bootstrap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2498,7 +2498,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
Expand All @@ -2518,9 +2517,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);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions includes/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2466,6 +2466,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?
Expand Down

0 comments on commit 50fb0be

Please sign in to comment.