Make WordPress Core

Changeset 909


Ignore:
Timestamp:
02/22/2004 03:29:54 AM (21 years ago)
Author:
michelvaldrighi
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r890 r909  
    7474
    7575/* Sending HTTP headers */
    76 // It is presumptious to think that WP is the only thing that might change on the page.
    77 @header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                 // Date in the past
    78 @header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
    79 @header("Cache-Control: no-store, no-cache, must-revalidate");     // HTTP/1.1
    80 @header("Cache-Control: post-check=0, pre-check=0", false);
    81 @header("Pragma: no-cache");                                     // HTTP/1.0
    82 @header ("X-Pingback: $siteurl/xmlrpc.php");
     76
     77if (!isset($doing_rss) || !$doing_rss) {
     78    // It is presumptious to think that WP is the only thing that might change on the page.
     79    @header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                 // Date in the past
     80    @header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
     81    @header("Cache-Control: no-store, no-cache, must-revalidate");     // HTTP/1.1
     82    @header("Cache-Control: post-check=0, pre-check=0", false);
     83    @header("Pragma: no-cache");                                     // HTTP/1.0
     84    @header ("X-Pingback: $siteurl/xmlrpc.php");
     85} else {
     86    // We're showing a feed, so WP is indeed the only thing that last changed
     87    @header('Last Modified: ' . gmdate(get_lastpostmodified()));
     88    @header ("X-Pingback: $siteurl/xmlrpc.php");
     89}
    8390
    8491/* Getting settings from db */
Note: See TracChangeset for help on using the changeset viewer.