From 51140af8ceb4ae08847a7ef4800bbd022f542513 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 3 Mar 2009 13:19:13 +0000 Subject: Content length on the simplecache. git-svn-id: https://code.elgg.org/elgg/trunk@3035 36083f99-b078-4883-b0ff-0f9b5a30f544 --- simplecache/view.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/simplecache/view.php b/simplecache/view.php index 826288c29..99f40c141 100644 --- a/simplecache/view.php +++ b/simplecache/view.php @@ -47,16 +47,17 @@ if ($simplecache_enabled || $override) { $filename = $dataroot . 'views_simplecache/' . md5($viewtype . $view); - if (file_exists($filename)) - $contents = @file_get_contents($filename); - else { + if (file_exists($filename)) { + $contents = file_get_contents($filename); + header("Content-Length: " . strlen($contents)); + } else { echo ''; exit; } } else { mysql_close($mysql_dblink); require_once(dirname(dirname(__FILE__)) . "/engine/start.php"); $contents = elgg_view($view); - //header("Content-Length: " . strlen($contents)); + header("Content-Length: " . strlen($contents)); } } } -- cgit v1.2.3