Fix Error: Requested Range Not Satisfiable

This commit is contained in:
calzoneman 2014-09-01 14:36:24 -05:00
parent 91c24518c5
commit 66865f718c
1 changed files with 3 additions and 1 deletions

View File

@ -238,9 +238,11 @@ module.exports = {
if (err) { if (err) {
if (err.message && err.message.match(/failed to decode param/i)) { if (err.message && err.message.match(/failed to decode param/i)) {
return res.status(400).send("Malformed path: " + req.path); return res.status(400).send("Malformed path: " + req.path);
} else if (err.message && err.message.match(/requested range not/i)) {
return res.status(416).end();
} }
Logger.errlog.log(err.stack); Logger.errlog.log(err.stack);
res.send(500); res.status(500).end();
} else { } else {
next(); next();
} }