Make node module's rss.xml controller return a response object with content-type set to xml
parent
1c6379e1db
commit
2961c4feee
|
@ -3,6 +3,7 @@
|
||||||
use Drupal\Core\Database\Query\AlterableInterface;
|
use Drupal\Core\Database\Query\AlterableInterface;
|
||||||
use Drupal\Core\Database\Query\SelectExtender;
|
use Drupal\Core\Database\Query\SelectExtender;
|
||||||
use Drupal\Core\Database\Query\SelectInterface;
|
use Drupal\Core\Database\Query\SelectInterface;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @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 .= format_rss_channel($channel['title'], $channel['link'], $channel['description'], $items, $channel['language'], $channel_extras);
|
||||||
$output .= "</rss>\n";
|
$output .= "</rss>\n";
|
||||||
|
|
||||||
drupal_add_http_header('Content-Type', 'application/rss+xml; charset=utf-8');
|
return new Response($output, 200, array('Content-Type' => 'application/rss+xml; charset=utf-8'));
|
||||||
print $output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue