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: https://develop.svn.wordpress.org/trunk@21913 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-09-19 01:51:40 +00:00
parent d904430fc0
commit b4350a0424
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');
nocache_headers();
if ( get_option('db_upgraded') ) {
flush_rewrite_rules();
update_option( 'db_upgraded', false );
@ -66,8 +68,6 @@ require_once(ABSPATH . 'wp-admin/includes/admin.php');
auth_redirect();
nocache_headers();
// Schedule trash collection
if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') )
wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');

View File

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