WordPress.org

Make WordPress Core

Ticket #9810: 9810.patch

File 9810.patch, 2.1 KB (added by peaceablewhale, 9 years ago)

New patch that does not affect feed autodiscovery

  • feed-rss.php

     
    55 * @package WordPress
    66 */
    77
    8 header('Content-Type: ' . feed_content_type('rss') . '; charset=' . get_option('blog_charset'), true);
     8header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
    99$more = 1;
    1010
    1111echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
  • feed-rss2-comments.php

     
    55 * @package WordPress
    66 */
    77
    8 header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
     8header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
    99
    1010echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
    1111?>
  • feed-rss2.php

     
    55 * @package WordPress
    66 */
    77
    8 header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
     8header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
    99$more = 1;
    1010
    1111echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
  • feed.php

     
    523523                $type = get_default_feed();
    524524
    525525        $types = array(
    526                 'rss'  => 'text/xml',
    527                 'rss2' => 'text/xml',
     526                'rss'  => 'application/rss+xml',
     527                'rss2' => 'application/rss+xml',
     528                'rss-http'  => 'text/xml',
    528529                'atom' => 'application/atom+xml',
    529                 'rdf'  => 'application/rdf+xml',
     530                'rdf'  => 'application/rdf+xml'
    530531        );
    531532
    532533        $content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream';