Make WordPress Core


Ignore:
Timestamp:
05/21/2004 10:33:47 PM (22 years ago)
Author:
michelvaldrighi
Message:

don't translate months and weekdays in date strings PLUS bugfix for 304 Not Modified on PHP CGI

File:
1 edited

Legend:

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

    r1308 r1338  
    8383
    8484    // We're showing a feed, so WP is indeed the only thing that last changed
    85     $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT')).' GMT';
     85    $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT';
    8686    $wp_etag = '"'.md5($wp_last_modified).'"';
    8787    @header('Last Modified: '.$wp_last_modified);
     
    9898        (($client_last_modified == $wp_last_modified) && ($client_etag == $wp_etag)) :
    9999        (($client_last_modified == $wp_last_modified) || ($client_etag == $wp_etag)) ) {
    100         header('HTTP/1.1 304 Not Modified');
    101         echo "\r\n\r\n";
    102         exit;
     100        if ( preg_match('/cgi/',php_sapi_name()) ) {
     101            header('HTTP/1.1 304 Not Modified');
     102            echo "\r\n\r\n";
     103            exit;
     104        } else {
     105            if (version_compare(phpversion(),'4.3.0','>=')) {
     106                header('Not Modified', TRUE, 304);
     107            } else {
     108                header('HTTP/1.x 304 Not Modified');
     109            }
     110        }
    103111    }
    104112
Note: See TracChangeset for help on using the changeset viewer.