Fix feed autodiscovery. Props peaceablewhale. fixes #9810

git-svn-id: https://develop.svn.wordpress.org/trunk@11358 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2009-05-16 05:15:21 +00:00
parent c8876e3798
commit 6a66b51970
4 changed files with 7 additions and 6 deletions

View File

@@ -5,7 +5,7 @@
* @package WordPress
*/
header('Content-Type: ' . feed_content_type('rss') . '; charset=' . get_option('blog_charset'), true);
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
$more = 1;
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>

View File

@@ -5,7 +5,7 @@
* @package WordPress
*/
header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
?>

View File

@@ -5,7 +5,7 @@
* @package WordPress
*/
header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
$more = 1;
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>

View File

@@ -523,10 +523,11 @@ function feed_content_type( $type = '' ) {
$type = get_default_feed();
$types = array(
'rss' => 'text/xml',
'rss2' => 'text/xml',
'rss' => 'application/rss+xml',
'rss2' => 'application/rss+xml',
'rss-http' => 'text/xml',
'atom' => 'application/atom+xml',
'rdf' => 'application/rdf+xml',
'rdf' => 'application/rdf+xml'
);
$content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream';