? boost-537186.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.47
diff -u -p -r1.1.2.1.2.3.2.47 boost.admin.inc
--- boost.admin.inc	6 Aug 2009 08:20:31 -0000	1.1.2.1.2.3.2.47
+++ boost.admin.inc	11 Aug 2009 02:18:58 -0000
@@ -509,6 +509,7 @@ function boost_admin_generate_htaccess($
   $css = '\\.css';
   $js = '\\.js';
   $gz = '\\.gz';
+  $char = BOOST_CHAR;
 
   $string = <<<ETO
   ### BOOST START ###
@@ -547,28 +548,28 @@ function boost_admin_generate_htaccess($
   RewriteCond %{HTTP:Accept-encoding} !gzip
   RewriteRule .* - [S=5]
 
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$html$gz -s
-  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$html$gz [L,T=text/html]
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$xml$gz -s
-  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$xml$gz [L,T=text/xml]
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_$css$gz -s
-  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_$css$gz [L,QSA,T=text/css]
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$js$gz -s
-  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$js$gz [L,T=text/javascript]
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_$js$gz -s
-  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}_$js$gz [L,QSA,T=text/javascript]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$html$gz -s
+  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$html$gz [L,T=text/html]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$xml$gz -s
+  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$xml$gz [L,T=text/xml]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char$css$gz -s
+  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char$css$gz [L,QSA,T=text/css]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$js$gz -s
+  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$js$gz [L,T=text/javascript]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char$js$gz -s
+  RewriteRule .* $cache_dir/$gzip_dir/$server_name%{REQUEST_URI}$char$js$gz [L,QSA,T=text/javascript]
 
   # NORMAL
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$html -s
-  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$html [L,T=text/html]
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$xml -s
-  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$xml [L,T=text/xml]
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}_$css -s
-  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}_$css [L,QSA,T=text/css]
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$js -s
-  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}_%{QUERY_STRING}$js [L,T=text/javascript]
-  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}_$js -s
-  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}_$js [L,QSA,T=text/javascript]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$html -s
+  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$html [L,T=text/html]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$xml -s
+  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$xml [L,T=text/xml]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}$char$css -s
+  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}$char$css [L,QSA,T=text/css]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$js -s
+  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}$char%{QUERY_STRING}$js [L,T=text/javascript]
+  RewriteCond $document_root$drupal_subdir/$cache_dir/$server_name%{REQUEST_URI}$char$js -s
+  RewriteRule .* $cache_dir/$server_name%{REQUEST_URI}$char$js [L,QSA,T=text/javascript]
   ### BOOST END ###
 ETO;
 
Index: boost.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.install,v
retrieving revision 1.2.2.1.2.3.2.26
diff -u -p -r1.2.2.1.2.3.2.26 boost.install
--- boost.install	6 Aug 2009 08:20:31 -0000	1.2.2.1.2.3.2.26
+++ boost.install	11 Aug 2009 02:18:58 -0000
@@ -63,6 +63,7 @@ function boost_requirements($phase) {
       $htaccess = file_get_contents('.htaccess');
       _boost_mkdir_p($cache_directory);
       $root_file = file_put_contents($cache_directory . '/' . variable_get('boost_root_file', '.boost'), $cache_directory);
+      $char = BOOST_CHAR;
 
       if ($cache_directory != boost_cache_directory(NULL, FALSE)) {
         $requirements['boost'] = array(
@@ -80,7 +81,7 @@ function boost_requirements($phase) {
           'value'       => $t('Cache path'),
         );
       }
-      elseif ($htaccess && count(explode("%{REQUEST_URI}_%{QUERY_STRING}\.html", $htaccess)) < 5) {
+      elseif ($htaccess && count(explode("%{REQUEST_URI}$char%{QUERY_STRING}\.html", $htaccess)) < 5) {
         $requirements['boost'] = array(
           'title'       => $t('Boost'),
           'description' => $t('.htaccess file does not contain the boost specific rewrite rules, or the rewrite rules have changed and they need to be updated.', array()),
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.90
diff -u -p -r1.3.2.2.2.5.2.90 boost.module
--- boost.module	6 Aug 2009 14:56:03 -0000	1.3.2.2.2.5.2.90
+++ boost.module	11 Aug 2009 02:18:59 -0000
@@ -51,6 +51,7 @@ define('BOOST_CRAWL_ON_CRON',        var
 define('BOOST_PUSH_HTML',            variable_get('boost_push_html', FALSE));
 define('BOOST_PUSH_XML',             variable_get('boost_push_xml', FALSE));
 define('BOOST_PUSH_JSON',            variable_get('boost_push_json', FALSE));
+define('BOOST_CHAR',                 '_');
 
 // This cookie is set for all authenticated users, so that they can be
 // excluded from caching (or in the future get a user-specific cached page):
@@ -100,10 +101,10 @@ function boost_init() {
   //set variables
   $GLOBALS['_boost_path'] = $_REQUEST['q'];
   // Make the proper filename for our query
-  $GLOBALS['_boost_query'] = '_';
+  $GLOBALS['_boost_query'] = BOOST_CHAR;
   foreach ($_GET as $key => $val) {
     if ($key != 'q' && $key != 'destination') {
-      $GLOBALS['_boost_query'] .= (($GLOBALS['_boost_query'] == '_') ? '' : '&') . $key . '=' . $val;
+      $GLOBALS['_boost_query'] .= (($GLOBALS['_boost_query'] == BOOST_CHAR) ? '' : '&') . $key . '=' . $val;
     }
   }
 
@@ -874,7 +875,7 @@ function boost_is_cacheable($path) {
   if (!BOOST_CACHE_XML && (preg_match('!/feed$!', $normal_path) || preg_match('!\.xml$!', $normal_path))) {
     return FALSE;
   }
-  if (!BOOST_CACHE_QUERY && $GLOBALS['_boost_query'] != '_') {
+  if (!BOOST_CACHE_QUERY && $GLOBALS['_boost_query'] != BOOST_CHAR) {
     return FALSE;
   }
 
@@ -1438,7 +1439,7 @@ function boost_cache_directory($host = N
  */
 function boost_file_path($path, $query = TRUE, $extension = BOOST_FILE_EXTENSION) {
   //handling of url variables
-  if ($GLOBALS['_boost_query'] != '_') {
+  if ($GLOBALS['_boost_query'] != BOOST_CHAR) {
     if ($query) {
       $path .= $GLOBALS['_boost_query'];
     }
@@ -1688,17 +1689,17 @@ function _boost_copy_css_files($css) {
   foreach ($css_files as $css_file) {
     if (file_exists($css_file . '.css')) {
       $src = $css_file . '.css';
-      $dest = BOOST_FILE_PATH . '/' . $css_file . '.css_.css';
+      $dest = BOOST_FILE_PATH . '/' . $css_file . '.css' . BOOST_CHAR . '.css';
       _boost_copy_file($src, $dest);
     }
     if (file_exists($css_file . '.css.gz')) {
       $src = $css_file . '.css.gz';
-      $dest = BOOST_GZIP_FILE_PATH . '/' . $css_file . '.css_.css.gz';
+      $dest = BOOST_GZIP_FILE_PATH . '/' . $css_file . '.css' . BOOST_CHAR . '.css.gz';
       _boost_copy_file($src, $dest);
     }
     elseif (BOOST_GZIP && file_exists($css_file . '.css')) {
       $src = $css_file . '.css';
-      $dest = BOOST_GZIP_FILE_PATH . '/' . $css_file . '.css_.css.gz';
+      $dest = BOOST_GZIP_FILE_PATH . '/' . $css_file . '.css' . BOOST_CHAR . '.css.gz';
       _boost_gz_copy_file($src, $dest);
     }
   }
@@ -1726,32 +1727,32 @@ function _boost_copy_js_files($js) {
   foreach ($js_files as $js_file) {
     if (file_exists($js_file . '.js')) {
       $src = $js_file . '.js';
-      $dest = BOOST_FILE_PATH . '/' . $js_file . '.js_.js';
+      $dest = BOOST_FILE_PATH . '/' . $js_file . '.js' . BOOST_CHAR . '.js';
       _boost_copy_file($src, $dest);
     }
     if (file_exists($js_file . '.js.gz')) {
       $src = $js_file . '.js.gz';
-      $dest = BOOST_GZIP_FILE_PATH . '/' . $js_file . '.js_.js.gz';
+      $dest = BOOST_GZIP_FILE_PATH . '/' . $js_file . '.js' . BOOST_CHAR . '.js.gz';
       _boost_copy_file($src, $dest);
     }
     elseif (BOOST_GZIP && file_exists($js_file . '.js')) {
       $src = $js_file . '.js';
-      $dest = BOOST_GZIP_FILE_PATH . '/' . $js_file . '.js_.js.gz';
+      $dest = BOOST_GZIP_FILE_PATH . '/' . $js_file . '.js' . BOOST_CHAR . '.js.gz';
       _boost_gz_copy_file($src, $dest);
     }
     if (file_exists($js_file . '.jsmin.js')) {
       $src = $js_file . '.jsmin.js';
-      $dest = BOOST_FILE_PATH . '/' . $js_file . '.jsmin.js_.js';
+      $dest = BOOST_FILE_PATH . '/' . $js_file . '.jsmin.js' . BOOST_CHAR . '.js';
       _boost_copy_file($src, $dest);
     }
     if (file_exists($js_file . '.jsmin.js.gz')) {
       $src = $js_file . '.jsmin.js.gz';
-      $dest = BOOST_GZIP_FILE_PATH . '/' . $js_file . '.jsmin.js_.js.gz';
+      $dest = BOOST_GZIP_FILE_PATH . '/' . $js_file . '.jsmin.js' . BOOST_CHAR . '.js.gz';
       _boost_copy_file($src, $dest);
     }
     elseif (BOOST_GZIP && file_exists($js_file . '.jsmin.js')) {
       $src = $js_file . '.jsmin.js';
-      $dest = BOOST_GZIP_FILE_PATH . '/' . $js_file . '.jsmin.js_.js.gz';
+      $dest = BOOST_GZIP_FILE_PATH . '/' . $js_file . '.jsmin.js' . BOOST_CHAR . '.js.gz';
       _boost_gz_copy_file($src, $dest);
     }
   }
