? boost-30.patch
? boost-305071.4.patch
? boost-305071.5.patch
Index: boost.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.admin.inc,v
retrieving revision 1.1.2.1.2.3.2.101
diff -u -p -r1.1.2.1.2.3.2.101 boost.admin.inc
--- boost.admin.inc	1 Nov 2009 04:55:41 -0000	1.1.2.1.2.3.2.101
+++ boost.admin.inc	2 Nov 2009 02:57:53 -0000
@@ -1022,7 +1022,7 @@ function boost_admin_generate_htaccess($
     $string .= "  # Caching for anonymous users\n";
     $string .= "  # Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request\n";
     $string .= "  RewriteCond %{REQUEST_METHOD} !^GET$ [OR]\n";
-    $string .= "  RewriteCond %{REQUEST_URI} (^$drupal_subdir(admin|$cache_dir|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]\n";
+    $string .= "  RewriteCond %{REQUEST_URI} (^$drupal_subdir(admin|logout|$cache_dir|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]\n";
     $string .= "  RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]\n";
     $string .= BOOST_LOOPBACK_BYPASS ? "  RewriteCond %{REMOTE_ADDR} ^$server_ip$ [OR]\n" : '';
     $string .= "  RewriteCond %{HTTPS} on\n";
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.219
diff -u -p -r1.3.2.2.2.5.2.219 boost.module
--- boost.module	1 Nov 2009 04:56:48 -0000	1.3.2.2.2.5.2.219
+++ boost.module	2 Nov 2009 02:57:54 -0000
@@ -133,7 +133,7 @@ function boost_help($path, $arg) {
       return '<p>' . t('') . '</p>'; // TODO: add help text.
   }
   //hack to get drupal_get_messages before they are destroyed.
-  $GLOBALS['_boost_message_count'] = count(drupal_get_messages(NULL, FALSE));
+  $GLOBALS['_boost_message_count'] += count(drupal_get_messages(NULL, FALSE));
 }
 
 /**
@@ -158,13 +158,8 @@ function boost_views_pre_render(&$view) 
  * Implementation of hook_init(). Performs page setup tasks if page not cached.
  */
 function boost_init() {
-  global $user, $base_path;
-  // Disable all caches when nocache is set
-  if (isset($_GET['nocache'])) {
-    $GLOBALS['conf']['cache'] = CACHE_DISABLED;
-    $GLOBALS['_boost_cache_this'] = FALSE;
-    return;
-  }
+  global $user, $base_path, $base_url;
+  $GLOBALS['_boost_message_count'] = 0;
 
   // Make sure this is not a 404 redirect from the htaccesss file
   $path = explode($base_path, request_uri());
@@ -192,6 +187,10 @@ function boost_init() {
     }
   }
 
+  if ($_REQUEST['q'] == '' && stristr($GLOBALS['_boost_query'], 'boost-logout=1')) {
+    drupal_add_js('window.location="' . $base_url . '";', 'inline', 'footer');
+  }
+
   if (!empty($user->uid)) {
     boost_set_cookie($user);
     if (BOOST_DISABLE_CLEAN_URL) {
@@ -203,6 +202,13 @@ function boost_init() {
     }
   }
 
+  // Disable all caches when nocache is set
+  if (isset($_GET['nocache'])) {
+    $GLOBALS['conf']['cache'] = CACHE_DISABLED;
+    $GLOBALS['_boost_cache_this'] = FALSE;
+    return;
+  }
+
   // Make sure the page is/should be cached according to our current configuration
   if (   strpos($_SERVER['SCRIPT_FILENAME'], 'index.php') === FALSE
       || variable_get('site_offline', 0)
@@ -240,13 +246,15 @@ function boost_init() {
  * cached by Boost.
  */
 function boost_exit($destination = NULL) {
-  // Check that hook_exit() was invoked by drupal_goto() for a POST request:
-  if (!empty($destination) && $_SERVER['REQUEST_METHOD'] == 'POST') {
-
+  global $user;
+  // Check that hook_exit() was invoked by drupal_goto() & not a GET request:
+  if (!empty($destination) && $_SERVER['REQUEST_METHOD'] != 'GET') {
     // Check that we're dealing with an anonymous visitor. and that some
     // session messages have actually been set during this page request:
-    global $user;
-    if (empty($user->uid) && ($messages = drupal_set_message())) {
+
+    $GLOBALS['_boost_message_count'] += count(drupal_get_messages(NULL, FALSE));
+    $GLOBALS['_boost_message_count'] += (int)drupal_set_message();
+    if (empty($user->uid) && $GLOBALS['_boost_message_count']) {
       // FIXME: call any remaining exit hooks since we're about to terminate?
 
       $query_parts = parse_url($destination);
@@ -261,6 +269,12 @@ function boost_exit($destination = NULL)
       exit(header('Location: ' . $destination));
     }
   }
+  if (empty($user->uid) && isset($GLOBALS['_boost_logout'])) {
+    $query_parts = parse_url($destination);
+    $query_parts['query'] .= (empty($query_parts['query']) ? '' : '&') . 'nocache=1&boost-logout=1';
+    $destination = boost_glue_url($query_parts);
+    exit(header('Location: ' . $destination));
+  }
 }
 
 /**
@@ -671,6 +685,7 @@ function boost_user($op, &$edit, &$accou
       break;
     case 'logout':
       boost_set_cookie($user, BOOST_TIME - 86400);
+      $GLOBALS['_boost_logout'] = TRUE;
       break;
     case 'delete':
       // Expire the relevant user page from the static page cache to prevent serving stale content:
@@ -1258,6 +1273,7 @@ function boost_is_cacheable($path) {
   if (   $normal_path == 'user'
       || preg_match('!^user/(login|register|password)!', $normal_path)
       || preg_match('!^admin!', $normal_path)
+      || preg_match('!^logout!', $normal_path)
       || preg_match('!comment/reply$!', $normal_path)
       || preg_match('!^node/add!', $normal_path)
       || preg_match('!^openid!', $normal_path)
Index: htaccess/boosted1.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/htaccess/Attic/boosted1.txt,v
retrieving revision 1.1.2.18
diff -u -p -r1.1.2.18 boosted1.txt
--- htaccess/boosted1.txt	30 Oct 2009 15:30:48 -0000	1.1.2.18
+++ htaccess/boosted1.txt	2 Nov 2009 02:57:54 -0000
@@ -51,7 +51,7 @@
   # Caching for anonymous users
   # Skip boost IF not get request OR uri has wrong dir OR cookie is set OR https request
   RewriteCond %{REQUEST_METHOD} !^GET$ [OR]
-  RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
+  RewriteCond %{REQUEST_URI} (^/(admin|logout|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
   RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
   RewriteCond %{HTTPS} on
   RewriteRule .* - [S=7]
Index: htaccess/boosted2.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/htaccess/Attic/boosted2.txt,v
retrieving revision 1.1.2.19
diff -u -p -r1.1.2.19 boosted2.txt
--- htaccess/boosted2.txt	30 Oct 2009 15:30:48 -0000	1.1.2.19
+++ htaccess/boosted2.txt	2 Nov 2009 02:57:54 -0000
@@ -51,7 +51,7 @@
   # Caching for anonymous users
   # Skip boost IF not get request OR uri has wrong dir OR cookie is set OR https request
   RewriteCond %{REQUEST_METHOD} !^GET$ [OR]
-  RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
+  RewriteCond %{REQUEST_URI} (^/(admin|logout|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
   RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
   RewriteCond %{HTTPS} on
   RewriteRule .* - [S=7]
