[wp-trac] [WordPress Trac] #36334: Custom RSS feed has wrong MIME type and forces download in browser
WordPress Trac
noreply at wordpress.org
Wed Mar 25 15:58:17 UTC 2020
#36334: Custom RSS feed has wrong MIME type and forces download in browser
----------------------------------------------+----------------------------
Reporter: Missilesilo | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
| Release
Component: Feeds | Version: 2.1
Severity: normal | Resolution:
Keywords: needs-docs needs-codex has-patch | Focuses:
----------------------------------------------+----------------------------
Comment (by DrLightman):
Replying to [comment:7 swissspidy]:
> {{{#!php
> <?php
> // Example A:
> ...
> // Example B:
> ...
> }}}
>
> Both examples work as expected running WordPress 4.5 and no additional
plugins.
Thanks for **Example B**, it works in WP 5.3.2
Example A instead, doesn't work and the line:
{{{#!php
<?php
header( 'Content-Type: ' . feed_content_type( 'rss2' ) . '; charset=' .
get_option( 'blog_charset' ), true );
}}}
in the file **\wordpress\wp-includes\feed-rss2.php** is misleading and has
no effects, I suppose in either the standard /feed/ or any other custom
/feed/custom/ one creates taking and including that file as a starting
template (as I usually do).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36334#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list