fix glashrom get-lc2-page

This commit is contained in:
zefie
2021-08-17 00:43:17 -04:00
parent 5083506c7f
commit 33ec71a106

View File

@@ -24,7 +24,6 @@ class WTVFlashrom {
async doLocalFlashROM(flashrom_file_path, request_path, callback, info_only = false) { async doLocalFlashROM(flashrom_file_path, request_path, callback, info_only = false) {
// use local flashrom files; // use local flashrom files;
console.log(info_only);
var self = this; var self = this;
try { try {
this.fs.readFile(flashrom_file_path, null, function (err, data) { this.fs.readFile(flashrom_file_path, null, function (err, data) {
@@ -179,7 +178,7 @@ class WTVFlashrom {
headers = errpage[0]; headers = errpage[0];
var data = errpage[1]; var data = errpage[1];
} }
if (!headers) { if (!headers && res.statusCode != 206) {
self.sendToClient(data, request_path, callback); self.sendToClient(data, request_path, callback);
} else { } else {
callback(data, headers); callback(data, headers);