Skip to content

Commit

Permalink
Merge pull request #10 from rjrodger/patch-1
Browse files Browse the repository at this point in the history
was checking mtime of cache rather than disk, resulting in stale versions
  • Loading branch information
tomgco committed Oct 4, 2011
2 parents 896777e + ea29fb5 commit 17b698e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/staticGzip.js
Expand Up @@ -172,7 +172,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;
Expand Down

0 comments on commit 17b698e

Please sign in to comment.