From 199d01218c73a35342fbc3e54e59ce47778cfe9d Mon Sep 17 00:00:00 2001
From: Bob Vincent <bobvin@pillars.net>
Date: Fri, 27 May 2011 21:03:47 -0400
Subject: [PATCH] Issue #1060352 by pillarsdotnet: Remove javascript cache compression.

---
 admin_menu.module |   26 --------------------------
 1 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/admin_menu.module b/admin_menu.module
index 515893f5fe39297005ce4dac04307dc70c3a1cc8..5579d1b6a35c45391a7828b483cb7cdbee3511e4 100644
--- a/admin_menu.module
+++ b/admin_menu.module
@@ -419,32 +419,6 @@ function admin_menu_js_cache($hash = NULL) {
   // Get the rendered menu.
   $content = admin_menu_output();
 
-  // @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'])) {
-    if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== FALSE) {
-      $encoding = 'x-gzip';
-    }
-    elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE) {
-      $encoding = 'gzip';
-    }
-    // Perform gzip compression when:
-    // 1) the user agent supports gzip compression.
-    // 2) Drupal page compression is enabled. Sites may wish to perform the
-    //    compression at the web server level (e.g. using mod_deflate).
-    // 3) PHP's zlib extension is loaded, but zlib compression is disabled.
-    if (isset($encoding) && variable_get('page_compression', TRUE) && extension_loaded('zlib') && zlib_get_coding_type() === FALSE) {
-      // Use Vary header to tell caches to keep separate versions of the menu
-      // based on user agent capabilities.
-      header('Vary: Accept-Encoding');
-      // Since we manually perform compression, we are also responsible to
-      // send a proper encoding header.
-      header('Content-Encoding: ' . $encoding);
-      $content = gzencode($content, 9, FORCE_GZIP);
-    }
-  }
-
   $expires = time() + (3600 * 24 * 365);
   header('Expires: ' . gmdate('D, d M Y H:i:s', $expires) . ' GMT');
   header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
-- 
1.7.4.1

