From ea29fb58e55b28ee2f1da9598dbdfa79bac77290 Mon Sep 17 00:00:00 2001 From: Richard Rodger Date: Sun, 25 Sep 2011 02:45:47 +0200 Subject: [PATCH] was checking mtime of cache rather than disk, resulting in stale versions served --- lib/staticGzip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/staticGzip.js b/lib/staticGzip.js index e9d8520..428514e 100644 --- a/lib/staticGzip.js +++ b/lib/staticGzip.js @@ -164,7 +164,7 @@ exports = module.exports = function staticGzip(dirPath, options){ if (req.headers['if-modified-since'] && gzippoCache[gzipName] && - +gzippoCache[gzipName].mtime <= new Date(req.headers['if-modified-since']).getTime()) { + +stat.mtime <= new Date(req.headers['if-modified-since']).getTime()) { setHeaders(gzippoCache[gzipName]); removeContentHeaders(res); res.statusCode = 304;