# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /Users/dave/Sites/thirdage/sites/all/modules/contrib/boost
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: boost.api.inc
--- boost.api.inc Base (BASE)
+++ boost.api.inc Locally Modified (Based On LOCAL)
@@ -19,6 +19,10 @@
  * text/html content type.
  */
 function boost_is_cacheable($path) {
+
+  // If we've gotten this far, there is really no other option but to bootstrap further.
+  drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);
+  
   $alias = drupal_get_path_alias($path);
   $path = drupal_get_normal_path($path); // normalize path
 
Index: boost.module
--- boost.module Base (BASE)
+++ boost.module Locally Modified (Based On LOCAL)
@@ -10,7 +10,7 @@
 // BOOST SETTINGS
 
 define('BOOST_PATH',                 dirname(__FILE__));
-define('BOOST_FRONTPAGE',            drupal_get_normal_path(variable_get('site_frontpage', 'node')));
+define('BOOST_FRONTPAGE',            variable_get('site_frontpage', 'node'));
 
 define('BOOST_ENABLED',              variable_get('boost', CACHE_DISABLED));
 define('BOOST_FILE_PATH',            variable_get('boost_file_path', 'cache'));
@@ -339,12 +339,31 @@
 
 function _boost_get_http_header($regex, $default = NULL) {
   // The last header is the one that counts:
-  $headers = preg_grep($regex, explode("\n", drupal_set_header()));
+  $headers = preg_grep($regex, _boost_get_http_headers());
   if (!empty($headers) && preg_match($regex, array_pop($headers), $matches)) {
     return $matches[1]; // found it
   }
   return $default; // no such luck
 }
 
+function _boost_get_http_headers() {
+  static $headers = array();
+  if (empty($headers)) {
 
+    // Get headers queued to be sent.
+    $header_names = _drupal_set_preferred_header_name();
+    foreach (drupal_get_header() as $name_lower => $value) {
+      if ($name_lower == ':status') {
+        $headers[] = $_SERVER['SERVER_PROTOCOL'] . ' ' . $value;
+      }
+      // Skip headers that have been unset.
+      elseif ($value) {
+        $headers[] = $header_names[$name_lower] . ': ' . $value;
+      }
+    }
+  }
+  return $headers;
+}
+
+
 //////////////////////////////////////////////////////////////////////////////
