From 7fbcffb30b050b49b4db5b181ca211f9e07b78a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Tue, 3 Apr 2012 20:42:02 +0200 Subject: fix crash if getFileCompressed fails (i.e. if /static/js is called) --- src/node/utils/Minify.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/node/utils/Minify.js b/src/node/utils/Minify.js index b5d7b472..1466ceaf 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -131,7 +131,10 @@ exports.minify = function(req, res, next) res.end(); } else if (req.method == 'GET') { getFileCompressed(filename, contentType, function (error, content) { - if(ERR(error)) return; + if(ERR(error, function(){ + res.writeHead(500, {}); + res.end(); + })) return; res.header("Content-Type", contentType); res.writeHead(200, {}); res.write(content); -- cgit v1.2.3