Index: admin_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.module,v
retrieving revision 1.43.2.17.2.5
diff -u -r1.43.2.17.2.5 admin_menu.module
--- admin_menu.module	4 Apr 2009 15:23:18 -0000	1.43.2.17.2.5
+++ admin_menu.module	7 Apr 2009 09:16:46 -0000
@@ -269,8 +269,9 @@
 
   // @todo According to http://www.mnot.net/blog/2006/05/11/browser_caching,
   //   IE will only cache the content when it is compressed.
-  // Determine if the client accepts gzipped data.
-  if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && function_exists('gzencode')) {
+  // Determine if the client accepts gzipped data. Also, check if PHP has the
+  // zlib extension installed and automatic output compression is not enabled.
+  if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && function_exists('gzencode') && zlib_get_coding_type() === FALSE) {
     if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE) {
       $encoding = 'gzip';
     }
