Revert "Merge branch 'dev' of https://github.com/zefie/zefie_wtvp_minisrv into dev"
This reverts commitc383b76e82, reversing changes made to7661cf604a.
This commit is contained in:
@@ -20,14 +20,13 @@ async function processLC2DownloadPage(flashrom_info, headers, numparts = null) {
|
|||||||
if (typeof flashrom_info === 'string') {
|
if (typeof flashrom_info === 'string') {
|
||||||
// zefie_flashrom_server error
|
// zefie_flashrom_server error
|
||||||
data = flashrom_info;
|
data = flashrom_info;
|
||||||
headers += "\nminisrv-no-mail-count: true";
|
headers += "\nminisrv-no-mail-count: true\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
|
||||||
headers += "\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
|
|
||||||
headers += "\nwtv-expire-all: wtv-flashrom:/content";
|
|
||||||
sendToClient(socket, headers, data);
|
sendToClient(socket, headers, data);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (numparts != null) flashrom_info.part_count = parseInt(numparts);
|
if (numparts != null) flashrom_info.part_count = parseInt(numparts);
|
||||||
if (!flashrom_info.part_count) flashrom_info.part_count = parseInt(flashrom_info.message.substring(flashrom_info.message.length - 4).replace(/\D/g, ''));
|
if (!flashrom_info.part_count) flashrom_info.part_count = parseInt(flashrom_info.message.substring(flashrom_info.message.length - 4).replace(/\D/g, ''));
|
||||||
|
console.log(flashrom_info);
|
||||||
if (parseInt(flashrom_info.part_number) >= 0 && flashrom_info.rompath && flashrom_info.next_rompath) {
|
if (parseInt(flashrom_info.part_number) >= 0 && flashrom_info.rompath && flashrom_info.next_rompath) {
|
||||||
if (!flashrom_info.message && flashrom_info.is_bootrom) {
|
if (!flashrom_info.message && flashrom_info.is_bootrom) {
|
||||||
flashrom_info.message = "BootRom Part " + (flashrom_info.part_number + 1) + " of " + flashrom_info.part_count;
|
flashrom_info.message = "BootRom Part " + (flashrom_info.part_number + 1) + " of " + flashrom_info.part_count;
|
||||||
@@ -151,9 +150,7 @@ ${flashrom_info.message}
|
|||||||
} else {
|
} else {
|
||||||
var errpage = wtvshared.doErrorPage(400)
|
var errpage = wtvshared.doErrorPage(400)
|
||||||
headers = errpage[0];
|
headers = errpage[0];
|
||||||
headers += "\nminisrv-no-mail-count: true";
|
headers += "\nminisrv-no-mail-count: true\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
|
||||||
headers += "\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
|
|
||||||
headers += "\nwtv-expire-all: wtv-flashrom:/content";
|
|
||||||
data = errpage[1];
|
data = errpage[1];
|
||||||
}
|
}
|
||||||
sendToClient(socket, headers, data);
|
sendToClient(socket, headers, data);
|
||||||
|
|||||||
@@ -1926,9 +1926,9 @@ if (minisrv_config.config.SessionStore) {
|
|||||||
|
|
||||||
if (minisrv_config.config.ServiceDeps) {
|
if (minisrv_config.config.ServiceDeps) {
|
||||||
var ServiceDeps = wtvshared.returnAbsolutePath(minisrv_config.config.ServiceDeps);
|
var ServiceDeps = wtvshared.returnAbsolutePath(minisrv_config.config.ServiceDeps);
|
||||||
console.log(" * Configured Service Dependencies at", ServiceDeps);
|
console.log(" * Configured Service Dependancies at", ServiceDeps);
|
||||||
} else {
|
} else {
|
||||||
throw ("ERROR: No Service Dependencies Directory (SessionDeps) defined!");
|
throw ("ERROR: No Service Dependancies Directory (SessionDeps) defined!");
|
||||||
}
|
}
|
||||||
|
|
||||||
var service_ip = minisrv_config.config.service_ip;
|
var service_ip = minisrv_config.config.service_ip;
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class WTVFlashrom {
|
|||||||
})
|
})
|
||||||
|
|
||||||
res.on('end', function () {
|
res.on('end', function () {
|
||||||
if (self.minisrv_config.config.debug_flags.debug) console.log(` * zefie's FlashROM Server HTTP Status: ${res.statusCode} ${res.statusMessage}`)
|
if (self.minisrv_config.config.debug_flags.debug) console.log(` * Zefie's FlashROM Server HTTP Status: ${res.statusCode} ${res.statusMessage}`)
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
var data = Buffer.from(data_hex, 'hex');
|
var data = Buffer.from(data_hex, 'hex');
|
||||||
} else if (res.statusCode == 206) {
|
} else if (res.statusCode == 206) {
|
||||||
|
|||||||
Reference in New Issue
Block a user