Skip to content

Commit

Permalink
He ain't ugly, he's my brother.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@2584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
matt committed May 5, 2005
1 parent f0a5472 commit 3cc9143
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions wp-blog-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,19 @@
if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) $client_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']);
else $client_etag = false;

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

0 comments on commit 3cc9143

Please sign in to comment.