mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Make the exit call explicit so that it works. Fixes #9248.
git-svn-id: http://svn.automattic.com/wordpress/trunk@10672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0a90b7aaf9
commit
51dc94d250
@ -304,6 +304,8 @@ class WP {
|
|||||||
function send_headers() {
|
function send_headers() {
|
||||||
$headers = array('X-Pingback' => get_bloginfo('pingback_url'));
|
$headers = array('X-Pingback' => get_bloginfo('pingback_url'));
|
||||||
$status = null;
|
$status = null;
|
||||||
|
$exit_required = false;
|
||||||
|
|
||||||
if ( is_user_logged_in() )
|
if ( is_user_logged_in() )
|
||||||
$headers = array_merge($headers, wp_get_nocache_headers());
|
$headers = array_merge($headers, wp_get_nocache_headers());
|
||||||
if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) {
|
if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) {
|
||||||
@ -349,7 +351,7 @@ class WP {
|
|||||||
(($client_modified_timestamp >= $wp_modified_timestamp) && ($client_etag == $wp_etag)) :
|
(($client_modified_timestamp >= $wp_modified_timestamp) && ($client_etag == $wp_etag)) :
|
||||||
(($client_modified_timestamp >= $wp_modified_timestamp) || ($client_etag == $wp_etag)) ) {
|
(($client_modified_timestamp >= $wp_modified_timestamp) || ($client_etag == $wp_etag)) ) {
|
||||||
$status = 304;
|
$status = 304;
|
||||||
add_action('send_headers', 'exit', 1);
|
$exit_required = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,6 +362,9 @@ class WP {
|
|||||||
foreach( (array) $headers as $name => $field_value )
|
foreach( (array) $headers as $name => $field_value )
|
||||||
@header("{$name}: {$field_value}");
|
@header("{$name}: {$field_value}");
|
||||||
|
|
||||||
|
if ($exit_required)
|
||||||
|
exit();
|
||||||
|
|
||||||
do_action_ref_array('send_headers', array(&$this));
|
do_action_ref_array('send_headers', array(&$this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user