Send nocache_headers() in the admin earlier, on the DB upgrade page. Prevents a potential redirect loop reproduced in Chrome from heavy caching of headers. props mdawaffe. see #21745.

git-svn-id: http://core.svn.wordpress.org/trunk@21913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-09-19 01:51:40 +00:00
parent bf3c8017a8
commit bee6374953
2 changed files with 4 additions and 2 deletions

View File

@ -29,6 +29,8 @@ if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
require_once(dirname(dirname(__FILE__)) . '/wp-load.php'); require_once(dirname(dirname(__FILE__)) . '/wp-load.php');
nocache_headers();
if ( get_option('db_upgraded') ) { if ( get_option('db_upgraded') ) {
flush_rewrite_rules(); flush_rewrite_rules();
update_option( 'db_upgraded', false ); update_option( 'db_upgraded', false );
@ -66,8 +68,6 @@ require_once(ABSPATH . 'wp-admin/includes/admin.php');
auth_redirect(); auth_redirect();
nocache_headers();
// Schedule trash collection // Schedule trash collection
if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') ) if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') )
wp_schedule_event(time(), 'daily', 'wp_scheduled_delete'); wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');

View File

@ -17,6 +17,8 @@ define( 'WP_INSTALLING', true );
/** Load WordPress Bootstrap */ /** Load WordPress Bootstrap */
require( '../wp-load.php' ); require( '../wp-load.php' );
nocache_headers();
timer_start(); timer_start();
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );