Skip to content

Commit

Permalink
Fix gzip
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez committed Jul 20, 2012
1 parent cea0fb4 commit da352a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ function copy(orig) {
function Cache(file, options) {
this.options = copy(options);
this.options.maxAge || (this.options.maxAge = 300);
typeof this.options.gzip == 'undefined' || (this.options.gzip = true);
if (typeof this.options.gzip === 'undefined') {
this.options.gzip = true;
}
this.file = file;
this.mime = mime.lookup(this.file);
this.stat = fs.statSync(this.file);
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ var url = require('url')

var stalwart = module.exports = function(root, options) {
var cache = {}, parsed = {};
typeof options.indexes !== 'undefined' || (options.indexes = true);
if (typeof options.indexes === 'undefined') {
options.indexes = true;
}

root = path.resolve(root);

Expand Down

0 comments on commit da352a0

Please sign in to comment.