Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.22
diff -u -F^f -r1.22 bootstrap.inc
--- includes/bootstrap.inc	16 Aug 2004 22:39:48 -0000	1.22
+++ includes/bootstrap.inc	28 Aug 2004 21:28:30 -0000
@@ -156,12 +156,12 @@ function cache_clear_all($cid = NULL, $w
  * Store the current page in the cache.
  */
 function page_set_cache() {
-  global $user, $base_url;
+  global $user, $base_url, $db_type;
 
   if (!$user->uid && $_SERVER['REQUEST_METHOD'] == 'GET') {
     // This will fail in some cases, see page_get_cache() for the explanation.
     if ($data = ob_get_contents()) {
-      if (function_exists('gzencode')) {
+      if ($db_type == 'mysql' && function_exists('gzencode')) {
         if (version_compare(phpversion(), '4.2', '>=')) {
           $data = gzencode($data, 9, FORCE_GZIP);
         }
@@ -202,6 +202,7 @@ function page_get_cache() {
  * Set HTTP headers in preparation for a page response.
  */
 function drupal_page_header() {
+  global $db_type; 
   if (variable_get('dev_timer', 0)) {
     timer_start();
   }
@@ -234,11 +235,11 @@ function drupal_page_header() {
       header("ETag: $etag");
 
       // Determine if the browser accepts gzipped data.
-      if (@strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') === false && function_exists('gzencode')) {
+      if (@strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') === false && function_exists('gzencode') && $db_type == 'mysql') {
         // Strip the gzip header and run uncompress.
         $cache->data = gzinflate(substr(substr($cache->data, 10), 0, -8));
       }
-      elseif (function_exists('gzencode')) {
+      elseif (function_exists('gzencode') && $db_type == 'mysql') {
         header('Content-Encoding: gzip');
       }
 
