From 3cc914328ab17130da2699da1971ce9788adc7fb Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 5 May 2005 23:05:51 +0000 Subject: [PATCH] He ain't ugly, he's my brother. git-svn-id: http://svn.automattic.com/wordpress/trunk@2584 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-blog-header.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/wp-blog-header.php b/wp-blog-header.php index 62cf05d5af..f17956186a 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -133,20 +133,19 @@ if ( !empty($error) && '404' == $error ) { 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; } } }