Index: esi.theme.inc
===================================================================
--- esi.theme.inc	(revision 3012)
+++ esi.theme.inc	(working copy)
@@ -12,12 +12,14 @@
   $output = '';
   // load our helper file.
   require_once(dirname(__FILE__) . '/esi.inc');
-  
+  // varnish do not support https so we just not apply esi if it is https
+  // http://www.varnish-cache.org/docs/2.1/faq/general.html?highlight=https
+  $http = !$_SERVER['HTTPS'];
   if ($list = block_list($region)) {
     foreach ($list as $key => $block) {
       // if ESI's enabled on the block, add an ESI tag instead of block content.
       $esi_config = _esi__block_settings($block->module, $block->delta);
-      $output .= $esi_config->enabled
+      $output .= ($esi_config->enabled && $http)
         ? theme('esi_tag', $block)
         : theme('block', $block);
     }
