RSS Feeds not working because of strange block in wp-blog-header.php (2 posts)

  1. patrick42
    Posted 11 years ago #

    For some reason, my RSS feeds weren't working (I'm using -- any request to a feed would just result in a blank page. I traced the problem down to the following block in wp-blog-header.php (lines 138-154):

    if ( ($client_last_modified &&amp; $client_etag) ?<br />
    ((strtotime($client_last_modified) >= strtotime($wp_last_modified)) &&amp; ($client_etag == $wp_etag)) :<br />
    ((strtotime($client_last_modified) >= strtotime($wp_last_modified)) || ($client_etag == $wp_etag)) ) {<br />
    if ( preg_match('/cgi/',php_sapi_name()) ) {<br />
    header('Status: 304 Not Modified');<br />
    echo "rnrn";<br />
    exit;<br />
    } else {<br />
    if ( version_compare(phpversion(), '4.3.0', '>=') )<br />
    {<br />
    header('Not Modified', TRUE, 304);<br />
    }<br />
    else<br />
    header('HTTP/1.x 304 Not Modified');<br />
    exit;<br />
    }<br />

    There aren't any comments that explain what this block does, and commenting it out seems to fix the problem for me. Can anyone shed some light as to what this does, and what will happen if it is commented out?



  2. James Huff
    Support Team Rep.
    Posted 11 years ago #

    The blank RSS problem was resolved by a fix to wp-blog-header.php implemented in v1.5.1.2. You may have forgotten to upgrade that file.

Topic Closed

This topic has been closed to new replies.

About this Topic