Skip to content

Commit

Permalink
Logic was *really* confusing and it seemed to return 304s badly, brea…
Browse files Browse the repository at this point in the history
…king all dashboards when I updated the dev blog

git-svn-id: http://svn.automattic.com/wordpress/trunk@2534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
matt committed Apr 14, 2005
1 parent c882b0a commit a0e1196
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions wp-blog-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,20 @@
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) ?
((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;
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;
}
}
}
}
Expand Down

0 comments on commit a0e1196

Please sign in to comment.