Changeset 2600 for trunk/wp-blog-header.php
- Timestamp:
- 05/13/2005 09:07:21 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-blog-header.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-blog-header.php
r2584 r2600 129 129 130 130 // Support for Conditional GET 131 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) $client_last_modified = $_SERVER['HTTP_IF_MODIFIED_SINCE'];132 else $client_last_modified = false;133 131 if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) $client_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']); 134 132 else $client_etag = false; 135 133 134 $client_last_modified = trim( $_SERVER['HTTP_IF_MODIFIED_SINCE']); 135 // If string is empty, return 0. If not, attempt to parse into a timestamp 136 $client_modified_timestamp = $client_last_modified ? strtotime($client_last_modified) : 0; 137 138 // Make a timestamp for our most recent modification... 139 $wp_modified_timestamp = strtotime($wp_last_modified); 140 136 141 if ( ($client_last_modified && $client_etag) ? 137 (( strtotime($client_last_modified) >= strtotime($wp_last_modified)) && ($client_etag == $wp_etag)) :138 (( strtotime($client_last_modified) >= strtotime($wp_last_modified)) || ($client_etag == $wp_etag)) ) {142 (($client_modified_timestamp >= $wp_modified_timestamp) && ($client_etag == $wp_etag)) : 143 (($client_modified_timestamp >= $wp_modified_timestamp) || ($client_etag == $wp_etag)) ) { 139 144 if ( preg_match('/cgi/',php_sapi_name()) ) { 140 145 header('Status: 304 Not Modified');
Note: See TracChangeset
for help on using the changeset viewer.