From 2961c4feee7c90e1c0ad06559abd2eec37911b70 Mon Sep 17 00:00:00 2001 From: Katherine Bailey Date: Sun, 15 Apr 2012 20:45:51 -0700 Subject: [PATCH] Make node module's rss.xml controller return a response object with content-type set to xml --- core/modules/node/node.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/node/node.module b/core/modules/node/node.module index a59a5c7efb3..c9dadd2807f 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -3,6 +3,7 @@ use Drupal\Core\Database\Query\AlterableInterface; use Drupal\Core\Database\Query\SelectExtender; use Drupal\Core\Database\Query\SelectInterface; +use Symfony\Component\HttpFoundation\Response; /** * @file @@ -2651,8 +2652,7 @@ function node_feed($nids = FALSE, $channel = array()) { $output .= format_rss_channel($channel['title'], $channel['link'], $channel['description'], $items, $channel['language'], $channel_extras); $output .= "\n"; - drupal_add_http_header('Content-Type', 'application/rss+xml; charset=utf-8'); - print $output; + return new Response($output, 200, array('Content-Type' => 'application/rss+xml; charset=utf-8')); } /**