Revert "Merge branch 'dev' of https://github.com/zefie/zefie_wtvp_minisrv into dev"

This reverts commit c383b76e82, reversing
changes made to 7661cf604a.
This commit is contained in:
MattMan
2022-10-31 12:31:37 -04:00
parent c383b76e82
commit 76187b4c81
3 changed files with 6 additions and 9 deletions

View File

@@ -20,14 +20,13 @@ async function processLC2DownloadPage(flashrom_info, headers, numparts = null) {
if (typeof flashrom_info === 'string') {
// zefie_flashrom_server error
data = flashrom_info;
headers += "\nminisrv-no-mail-count: true";
headers += "\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
headers += "\nwtv-expire-all: wtv-flashrom:/content";
headers += "\nminisrv-no-mail-count: true\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
sendToClient(socket, headers, data);
return false;
}
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, ''));
console.log(flashrom_info);
if (parseInt(flashrom_info.part_number) >= 0 && flashrom_info.rompath && flashrom_info.next_rompath) {
if (!flashrom_info.message && flashrom_info.is_bootrom) {
flashrom_info.message = "BootRom Part " + (flashrom_info.part_number + 1) + " of " + flashrom_info.part_count;
@@ -151,9 +150,7 @@ ${flashrom_info.message}
} else {
var errpage = wtvshared.doErrorPage(400)
headers = errpage[0];
headers += "\nminisrv-no-mail-count: true";
headers += "\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
headers += "\nwtv-expire-all: wtv-flashrom:/content";
headers += "\nminisrv-no-mail-count: true\nwtv-expire-all: wtv-flashrom:/get-lc2-page?";
data = errpage[1];
}
sendToClient(socket, headers, data);

View File

@@ -1926,9 +1926,9 @@ if (minisrv_config.config.SessionStore) {
if (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 {
throw ("ERROR: No Service Dependencies Directory (SessionDeps) defined!");
throw ("ERROR: No Service Dependancies Directory (SessionDeps) defined!");
}
var service_ip = minisrv_config.config.service_ip;

View File

@@ -164,7 +164,7 @@ class WTVFlashrom {
})
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) {
var data = Buffer.from(data_hex, 'hex');
} else if (res.statusCode == 206) {