if we're doing feeds, we shall not send 'always modified' headers

git-svn-id: http://svn.automattic.com/wordpress/trunk@909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
michelvaldrighi 2004-02-22 03:29:54 +00:00
parent 6d59c60739
commit 614e542502
1 changed files with 14 additions and 7 deletions

View File

@ -73,13 +73,20 @@ $wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','e
/* Sending HTTP headers */
// It is presumptious to think that WP is the only thing that might change on the page.
@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
@header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
@header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
@header("Cache-Control: post-check=0, pre-check=0", false);
@header("Pragma: no-cache"); // HTTP/1.0
@header ("X-Pingback: $siteurl/xmlrpc.php");
if (!isset($doing_rss) || !$doing_rss) {
// It is presumptious to think that WP is the only thing that might change on the page.
@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
@header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
@header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
@header("Cache-Control: post-check=0, pre-check=0", false);
@header("Pragma: no-cache"); // HTTP/1.0
@header ("X-Pingback: $siteurl/xmlrpc.php");
} else {
// We're showing a feed, so WP is indeed the only thing that last changed
@header('Last Modified: ' . gmdate(get_lastpostmodified()));
@header ("X-Pingback: $siteurl/xmlrpc.php");
}
/* Getting settings from db */
if (isset($doing_rss) && $doing_rss == 1)