[wp-hackers] Possible RSS bug in WP 1.5

Ethan King ferrill at gmail.com
Tue Mar 15 00:19:58 GMT 2005


I am having trouble with my RSS feeds in WP 1.5.  When I try to
validate my RSS feed or use the PlanetPlanet! feed aggregator WP sends
a HTTP 404 Error.  Here is an example of what I am talking about:

http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.speakings.net%2Ftest15%2Fwp-rss2.php

But when the RSS link is shown in Firefox it seems to work fine.  I
have tracked the problem down to the wp-blog-header.php file at line
~113.

Here is the code:
if ( !empty($error) && '404' == $error ) {
	if ( preg_match('/cgi/', php_sapi_name()) )
		@header('Status: 404 Not Found');
	else
		@header('HTTP/1.x 404 Not Found');
 } else if ( empty($feed) ) {
	@header('X-Pingback: '. get_bloginfo('pingback_url'));
	@header('Content-type: ' . get_option('html_type') . '; charset=' .
get_option('blog_charset'));
} else {

WP is sending the first 'Status: 404 Not Found' error.  I know this
becuase if I change the number to something random like 503 then that
is the error number sent.  In a slightly older version of the code it
works fine.  Here is what the older code looks like:

if ( '' != $feed )
	$doing_rss = true;


if ( is_trackback() )
	$doing_trackback = true;

// Sending HTTP headers

if ( is_404() ) {
	header('HTTP/1.x 404 Not Found');
} else if ( !isset($doing_rss) || !$doing_rss ) {
	@header('X-Pingback: '. get_bloginfo('pingback_url'));
} else {

Anyone have any ideas?  This problem is driving me batty.

Thanks!


More information about the wp-hackers mailing list