Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.235
diff -u -p -r1.235 bootstrap.inc
--- includes/bootstrap.inc	12 Oct 2008 08:37:14 -0000	1.235
+++ includes/bootstrap.inc	12 Oct 2008 15:37:52 -0000
@@ -687,14 +687,6 @@ function drupal_page_cache_header($cache
     return;
   }
 
-  // Send appropriate response:
-  header("Last-Modified: $last_modified");
-  header("ETag: $etag");
-
-  // The following headers force validation of cache:
-  header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
-  header("Cache-Control: must-revalidate");
-
   if (variable_get('page_compression', TRUE)) {
     // Determine if the browser accepts gzipped data.
     if (@strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') === FALSE && function_exists('gzencode')) {
@@ -706,6 +698,17 @@ function drupal_page_cache_header($cache
     }
   }
 
+  // Send appropriate response:
+  header("Last-Modified: $last_modified");
+  header("ETag: $etag");
+
+  // Send size of the entity-body, in decimal number of octets:
+  header('Content-Length: ' . strlen($cache->data));
+
+  // The following headers force validation of cache:
+  header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
+  header("Cache-Control: must-revalidate");
+
   // Send the original request's headers. We send them one after
   // another so PHP's header() function can deal with duplicate
   // headers.
