summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Bartelmeß <mba@fourplusone.de>2012-04-03 20:42:02 +0200
committerMatthias Bartelmeß <mba@fourplusone.de>2012-04-03 20:42:02 +0200
commit7fbcffb30b050b49b4db5b181ca211f9e07b78a0 (patch)
treee4824f61dc7ff423ec93e4ecb9ebdf5fae4aa5a5 /src
parent8be52df5154f4704fc01d975a0ce6cc565ebe9d1 (diff)
downloadetherpad-lite-7fbcffb30b050b49b4db5b181ca211f9e07b78a0.zip
fix crash if getFileCompressed fails (i.e. if /static/js is called)
Diffstat (limited to 'src')
-rw-r--r--src/node/utils/Minify.js5
1 files changed, 4 insertions, 1 deletions
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);