From 9e0b62e2d054f786845a34610e288b72ee09c1fe Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 4 Oct 2006 03:54:10 +0000 Subject: [PATCH] nocache_headers from _ck_ and Nazgul. fixes #3027 git-svn-id: https://develop.svn.wordpress.org/trunk@4291 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/classes.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 6d5fec7344..aa19f3cac0 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -171,6 +171,8 @@ class WP { nocache_headers(); if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) { status_header( 404 ); + if ( !is_user_logged_in() ) + nocache_headers(); @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); } else if ( empty($this->query_vars['feed']) ) { @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); @@ -260,6 +262,7 @@ class WP { if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { $wp_query->set_404(); status_header( 404 ); + nocache_headers(); } elseif( is_404() != true ) { status_header( 200 ); }