From 3921cc013788a9a98d5706acf3cd82274c2ebb3c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 13 Aug 2014 06:34:01 -0400 Subject: [PATCH] refactor(main) isGzip: pReq -> req --- lib/server/main.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/server/main.js b/lib/server/main.js index 590f7f1d..8e2942cc 100644 --- a/lib/server/main.js +++ b/lib/server/main.js @@ -384,7 +384,7 @@ p.status = FILE_NOT_FOUND; if (!p.data && error) - p.data = error.toString(); + p.data = error.message; sendResponse(p); } @@ -427,14 +427,15 @@ return pathname; } - function isGZIP(pReq) { - var lEnc, lGZIP; - if (pReq) { - lEnc = pReq.headers['accept-encoding'] || ''; - lGZIP = lEnc.match(/\bgzip\b/); + function isGZIP(req) { + var enc, is; + + if (req) { + enc = req.headers['accept-encoding'] || ''; + is = enc.match(/\bgzip\b/); } - return lGZIP; + return is; } function setHeader(header, response) {