Permalink
Browse files

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
  • Loading branch information...
nacin committed Sep 19, 2012
1 parent bf3c801 commit bee6374953bfed75f06df2f7286160cb51bf42a4
Showing with 4 additions and 2 deletions.
  1. +2 −2 wp-admin/admin.php
  2. +2 −0 wp-admin/upgrade.php
View
@@ -29,6 +29,8 @@
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 @@
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
@@ -17,6 +17,8 @@
/** Load WordPress Bootstrap */
require( '../wp-load.php' );
+nocache_headers();
+
timer_start();
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );

0 comments on commit bee6374

Please sign in to comment.