[Pkg-javascript-commits] [node-static] 130/151: Fix check for acceptEncoding header to work if there is no accept-encoding header
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Tue Jan 7 23:18:03 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository node-static.
commit 7419a62db10f2a1cd92ad16b4e31d56b15d82de4
Author: Dobes Vandermeer <dobesv at gmail.com>
Date: Wed Nov 2 22:57:07 2011 +0800
Fix check for acceptEncoding header to work if there is no accept-encoding header
---
lib/node-static.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/node-static.js b/lib/node-static.js
index a862f26..dbb6d38 100644
--- a/lib/node-static.js
+++ b/lib/node-static.js
@@ -231,7 +231,7 @@ this.Server.prototype.gzipOk = function(req, contentType) {
if(enable &&
(typeof enable === 'boolean' ||
(contentType && (enable instanceof RegExp) && enable.test(contentType)))) {
- var acceptEncoding = req.headers['accept-encoding'];
+ var acceptEncoding && acceptEncoding = req.headers['accept-encoding'];
return acceptEncoding && acceptEncoding.indexOf("gzip") >= 0;
}
return false;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-static.git
More information about the Pkg-javascript-commits
mailing list