? boost_hook_requirements.patch
? boost_mod_headers.patch
Index: INSTALL.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/INSTALL.txt,v
retrieving revision 1.1.2.1.2.5
diff -u -p -r1.1.2.1.2.5 INSTALL.txt
--- INSTALL.txt	24 Oct 2008 23:03:53 -0000	1.1.2.1.2.5
+++ INSTALL.txt	2 Dec 2008 14:55:59 -0000
@@ -11,10 +11,14 @@ In order for the static files to be corr
 must be correctly setup to execute more often than, or as often as, the
 cache lifetime interval you specify.
 
-Since the static page caching is implemented with mod_rewrite directives,
-Apache version 1.3 or 2.x with mod_rewrite enabled is required (if Drupal's
-clean URLs work for you, you're fine; if not, get them working first).
-Other web servers, such as Lighttpd, are NOT supported at present.
+Since the static page caching is implemented with mod_rewrite and mod_headers
+directives, Apache version 1.3 or 2.x with mod_rewrite and mod_headers enabled
+is required.  If your clean URL's are working on your site, then you are all set with
+mod_rewrite.  Checking for mod_headers can be trickier.  If you enable Boost and
+have the Boost .htaccess file in place, you can use a tool like Firebug to check that
+the main request for the boosted website has "Response headers" like:
+"Cache-Control max-age=1, no-store, no-cache, must-revalidate, post-check=0,
+pre-check=0".  Other web servers, such as Lighttpd, are NOT supported at present.
 
 The `drush' module is required for (optional) command line usage.
 
Index: boost.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.install,v
retrieving revision 1.2.2.1.2.3
diff -u -p -r1.2.2.1.2.3 boost.install
--- boost.install	21 Sep 2007 12:00:44 -0000	1.2.2.1.2.3
+++ boost.install	2 Dec 2008 14:55:59 -0000
@@ -25,3 +25,30 @@ function boost_install() {
 }
 
 //////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Implementation of hook_requirements
+ */
+function boost_requirements($phase) {
+  $requirements = array();
+  $t = get_t();
+  // Get all available Apache modules.
+  $modules = apache_get_modules();
+  $requirements['boost'] = array(
+    'title' => $t('Apache mod_headers'),
+    'value' => $t('Installed'),
+  );
+  if (!in_array('mod_headers', $modules)) {
+    $requirements['boost']['title'] = $t('a webserver');
+    $requirements['boost']['value'] = $t('where the Apache module "mod_headers" is not available.');
+    $requirements['boost']['description'] = $t('The Apache module "mod_headers" is not available.  You must enable !mod_headers for Apache.', array('!mod_headers' => l('mod_headers', 'http://httpd.apache.org/docs/2.0/mod/mod_headers.html', array(), NULL, NULL, TRUE)));
+    $requirements['boost']['severity'] = REQUIREMENT_ERROR;
+    // In order to get an intuitive message when trying to install Boost versus when looking at the
+    // status page, the following conditional is necessary:
+    if ($phase == 'runtime') {
+      $requirements['boost']['title'] = $t('Apache mod_headers');
+      $requirements['boost']['value'] = $t('Not available');
+    }
+  }
+  return $requirements;
+}
\ No newline at end of file
