? boost-651226.patch
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.273
diff -u -p -r1.3.2.2.2.5.2.273 boost.module
--- boost.module	5 Dec 2009 06:07:29 -0000	1.3.2.2.2.5.2.273
+++ boost.module	5 Dec 2009 08:12:15 -0000
@@ -1334,6 +1334,14 @@ function _boost_ob_handler() {
         $filename = boost_file_path($GLOBALS['_boost_path'], TRUE, BOOST_JSON_EXTENSION);
       }
     }
+    elseif (stristr($types, 'application/pdf')) {
+      if ($status == 200 && $GLOBALS['_boost_cache_this']) {
+        boost_cache_set($GLOBALS['_boost_path'], $decompressed_buffer, '.pdf');
+      }
+      elseif ($status == 404 || $status == 403) {
+        $filename = boost_file_path($GLOBALS['_boost_path'], TRUE, '.pdf');
+      }
+    }
     elseif (stristr($types, 'application/rss') || stristr($types, 'text/xml') || stristr($types, 'application/rss+xml')) {
       if ($status == 200 && $GLOBALS['_boost_cache_this']) {
         if (BOOST_ASYNCHRONOUS_OUTPUT) {
@@ -2205,6 +2213,9 @@ function boost_cache_set($path, $data, $
         $data = rtrim($data) . "\n" . $comment;
       }
       break;
+    case '.pdf':
+      $expire = ($expire == -2) ? BOOST_CACHE_XML_LIFETIME : $expire;
+      break;
   }
 
   // Invoke hook_boost_preprocess($path, $data, $extension)
Index: htaccess/boosted1.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/htaccess/Attic/boosted1.txt,v
retrieving revision 1.1.2.22
diff -u -p -r1.1.2.22 boosted1.txt
--- htaccess/boosted1.txt	5 Dec 2009 06:11:59 -0000	1.1.2.22
+++ htaccess/boosted1.txt	5 Dec 2009 08:12:16 -0000
@@ -1,6 +1,6 @@
   ### BOOST START ###
   AddDefaultCharset utf-8
-  <FilesMatch "(\.html\.gz|\.html|\.xml\.gz|\.xml|\.json\.gz|\.json)$">
+  <FilesMatch "(\.html\.gz|\.html|\.xml\.gz|\.xml|\.json\.gz|\.json|\.pdf|\.pdf\.gz)$">
     <IfModule mod_headers.c>
       Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
       Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
@@ -26,6 +26,9 @@
   <FilesMatch "(\.css|\.css\.gz)$">
     ForceType text/css
   </FilesMatch>
+  <FilesMatch "(\.pdf|\.pdf\.gz)$">
+    ForceType application/pdf
+  </FilesMatch>
 
   # Gzip Cookie Test
   RewriteRule boost-gzip-cookie-test\.html  cache/perm/boost-gzip-cookie-test\.html\.gz [L,T=text/html]
@@ -53,18 +56,20 @@
   RewriteCond %{HTTP:Pragma} no-cache [OR]
   RewriteCond %{HTTP:Cache-Control} no-cache [OR]
   RewriteCond %{HTTPS} on
-  RewriteRule .* - [S=7]
+  RewriteRule .* - [S=9]
 
   # GZIP
   RewriteCond %{HTTP_COOKIE} !(boost-gzip)
   RewriteCond %{HTTP:Accept-encoding} !gzip
-  RewriteRule .* - [S=3]
+  RewriteRule .* - [S=4]
   RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
   RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html]
   RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml\.gz -s
   RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml\.gz [L,T=text/xml]
   RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.json\.gz -s
   RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.json\.gz [L,T=text/javascript]
+  RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.pdf\.gz -s
+  RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.pdf\.gz [L,T=application/pdf]
 
   # NORMAL
   RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
@@ -73,6 +78,8 @@
   RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml [L,T=text/xml]
   RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.json -s
   RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.json [L,T=text/javascript]
+  RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.pdf -s
+  RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.pdf [L,T=application/pdf]
 
   ### BOOST END ###
 
