nocache_headers from _ck_ and Nazgul. fixes #3027
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
052b0b8c37
commit
fdb244801f
|
@ -1621,6 +1621,8 @@ class WP {
|
||||||
nocache_headers();
|
nocache_headers();
|
||||||
if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) {
|
if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) {
|
||||||
status_header( 404 );
|
status_header( 404 );
|
||||||
|
if ( !is_user_logged_in() )
|
||||||
|
nocache_headers();
|
||||||
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
||||||
} else if ( empty($this->query_vars['feed']) ) {
|
} else if ( empty($this->query_vars['feed']) ) {
|
||||||
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
||||||
|
@ -1710,6 +1712,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'], '?'))) ) ) {
|
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();
|
$wp_query->set_404();
|
||||||
status_header( 404 );
|
status_header( 404 );
|
||||||
|
nocache_headers();
|
||||||
} elseif( is_404() != true ) {
|
} elseif( is_404() != true ) {
|
||||||
status_header( 200 );
|
status_header( 200 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue