[wp-trac] [WordPress Trac] #36334: Custom RSS feed has wrong MIME type and forces download in browser

WordPress Trac noreply at wordpress.org
Sat Mar 26 13:46:30 UTC 2016


#36334: Custom RSS feed has wrong MIME type and forces download in browser
--------------------------+------------------------------
 Reporter:  Missilesilo   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Feeds         |     Version:  2.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by swissspidy):

 * version:  4.4.2 => 2.1


Comment:

 You need to filter `feed_content_type()` to set the content type for your
 custom feed. The content type defaults to `application/octet-stream`,
 therefore this bug is expected behaviour.

 Although `/wp-includes/feed-rss2.php` and the like use `header()` as well,
 that declaration seems to be useless.

 I'd say `feed_content_type()` should be mentioned in the `add_feed()`
 docblock.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36334#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list