Fixed meshcore downloads.
This commit is contained in:
parent
9810e58cc0
commit
104f333734
|
@ -46393,4 +46393,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -4526,9 +4526,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
if (req.query.dlcore != null) {
|
||||
// Download mesh core
|
||||
var bin = parent.defaultMeshCores[req.query.dlcore];
|
||||
if (bin == null) { try { res.sendStatus(404); } catch (ex) { } return; }
|
||||
if ((bin == null) || (bin.length < 5)) { try { res.sendStatus(404); } catch (ex) { } return; }
|
||||
setContentDispositionHeader(res, 'application/octet-stream', req.query.dlcore + '.js', null, 'meshcore.js');
|
||||
res.send(bin);
|
||||
res.send(bin.substring(4));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue