From 67fc03f3aa27225c986909a31e92acc41e037d03 Mon Sep 17 00:00:00 2001
From: Daniel Wehner <daniel.wehner@erdfisch.de>
Date: Sun, 10 Jun 2012 14:44:43 +0200
Subject: [PATCH] Issue #1623492 by dawehner: Commit a temporary fix for the
 feed display to return the right http-Content-type.

---
 plugins/views_plugin_display_feed.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/plugins/views_plugin_display_feed.inc b/plugins/views_plugin_display_feed.inc
index 0965fc18abd7..fd8156346736 100644
--- a/plugins/views_plugin_display_feed.inc
+++ b/plugins/views_plugin_display_feed.inc
@@ -5,6 +5,8 @@
  * Contains the feed display plugin.
  */
 
+use Symfony\Component\HttpFoundation\Response;
+
 /**
  * The plugin that handles a feed, such as RSS or atom.
  *
@@ -39,7 +41,10 @@ function execute() {
     if (empty($output)) {
       return drupal_not_found();
     }
-    print $output;
+    // @todo: This is not a valid fix, because only the style plugin knows the
+    // Content-Type. There needs some global response object on the view which
+    // can be manipulated and then is used optionally.
+    return new Response($output, 200, array('Content-Type' => 'application/rss+xml; charset=utf-8'));
   }
 
   function preview() {
-- 
GitLab