I'm writing a WordPress plugin and recently I've started having an invalid XML format in feed. It says \[code\]XML Parsing Error: XML or text declaration not at start of entity\[/code\] in firefox or \[code\]line 1, column 1: Blank line before XML declaration\[/code\] in the feed validation service. I spotted that the problem is caused by a class method called \[code\]handle_content_type()\[/code\] defined in class-simplepie.php. When I comment out the line using the method in my plugin code, the error's gone.The code of the method is as follows:\[code\]function handle_content_type($mime = 'text/html'){ if (!headers_sent()) { $header = "Content-type: $mime;"; if ($this->get_encoding()) { $header .= ' charset=' . $this->get_encoding(); } else { $header .= ' charset=UTF-8'; } header($header); }}\[/code\]So, I simplified it to see what triggers the error and the header() function was the one causing it. This test code just produces the problem. Firefox and IE displayed the feed just fine but Google Chrome failed.\[code\]add_filter('the_content_feed', 'thecontentfiltertest');function thecontentfiltertest($content) { $mime = 'text/html'; $header = "Content-type: $mime;"; $header .= ' charset=UTF-8'; header($header); return $content ;}\[/code\]So I'd like to know why this causes the problem. I know the XML format doesn't have such html header things. But when I see the source of the output, there is no such header info there. While Firefox and IE handle it fine, then why doesn't Chrome allow it?