diff options
author | Matthias Bartelmeß <mba@fourplusone.de> | 2012-04-03 20:42:02 +0200 |
---|---|---|
committer | Matthias Bartelmeß <mba@fourplusone.de> | 2012-04-03 20:42:02 +0200 |
commit | 7fbcffb30b050b49b4db5b181ca211f9e07b78a0 (patch) | |
tree | e4824f61dc7ff423ec93e4ecb9ebdf5fae4aa5a5 /src | |
parent | 8be52df5154f4704fc01d975a0ce6cc565ebe9d1 (diff) | |
download | etherpad-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.js | 5 |
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); |