From acf3294e18790116df7393ed17bcdcd7fe468103 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 5 Jan 2017 03:08:14 +0000 Subject: [PATCH] Feeds: Don't override the Content-Type header inside `fetch_feed()`. SimplePie can set the Content-Type header automatically with the correct charset for convenience, but we already force the charset to match the site's, making it redundant at best. At worst, SimplePie incorrectly overrides the content-type for non-HTML content (such as API requests). Props dlh, stevenkword, rmccue. Merges [39681] to the 4.7 branch. Fixes #39066. git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39683 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/feed.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wp-includes/feed.php b/src/wp-includes/feed.php index e6686c040e..dbeb3a0f83 100644 --- a/src/wp-includes/feed.php +++ b/src/wp-includes/feed.php @@ -702,7 +702,6 @@ function fetch_feed( $url ) { do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) ); $feed->init(); $feed->set_output_encoding( get_option( 'blog_charset' ) ); - $feed->handle_content_type(); if ( $feed->error() ) return new WP_Error( 'simplepie-error', $feed->error() );