From e62f40ab10852b115d4733078e712b3d046768ef Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Fri, 23 Sep 2011 12:32:39 -0700 Subject: [PATCH] fixes requested by @nateps --- lib/gzip.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/gzip.js b/lib/gzip.js index b5b3acd..aa05aab 100644 --- a/lib/gzip.js +++ b/lib/gzip.js @@ -45,18 +45,18 @@ exports = module.exports = function gzip(options) { res.writeHead(res.statusCode); } res[name].apply(this, arguments); - } + }; }); res.writeHead = function(code) { var args = Array.prototype.slice.call(arguments, 0), write = defaults.write, end = defaults.end, - headers, key, accept, type, encoding, gzip,ua; + headers, key, accept, type, encoding, gzip, ua; if (args.length > 1) { headers = args.pop(); for (key in headers) { - res.setHeader(key, headers[key]) + res.setHeader(key, headers[key]); } } @@ -66,7 +66,6 @@ exports = module.exports = function gzip(options) { encoding = res.getHeader('content-encoding'); if (code !== 200 || !~accept.indexOf('gzip') || - ~ua.indexOf("MSIE 5") || (~ua.indexOf("MSIE 6") && !~ua.indexOf("SV1")) || !matchType.test(type) || encoding) { res.write = write;