﻿Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.211
diff -u -r1.211 bootstrap.inc
--- includes/bootstrap.inc	26 May 2008 17:12:54 -0000	1.211
+++ includes/bootstrap.inc	24 Jun 2008 11:18:22 -0000
@@ -655,8 +655,15 @@
   header("Cache-Control: must-revalidate");
 
   if (variable_get('page_compression', TRUE)) {
+    // Check for buggy versions of Internet Explorer
+    if (!strstr($_SERVER['HTTP_USER_AGENT'], 'Opera') && preg_match('/^Mozilla\/4\.0 \(compatible; MSIE ([0-9]\.[0-9])/i', $_SERVER['HTTP_USER_AGENT'], $matches)) {
+      $version = floatval($matches[1]);
+      if ($version < 6 || ($version == 6 && !strstr($_SERVER['HTTP_USER_AGENT'], 'EV1'))) {
+        $no_gzip = true;
+      }
+    }     
     // 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) || ($no_gzip)) && (function_exists('gzencode'))) {
       // Strip the gzip header and run uncompress.
       $cache->data = gzinflate(substr(substr($cache->data, 10), 0, -8));
     }