- BREAKING CHANGE from v0.9.35 and eariler: Move accounts into subfolder of SessionStore
 - viewergen and viewer updates from @GraspYonOx
 - new homepage theme inspired by @GraspYonOx
 - connect setup also mostly by @GraspYonOx
 - numerous bug fixes
 - nntp-server-zefie is now on npmjs
 - implement proper nodejs debugging
   - will start to phase out using console.log for actual debugging
   - existing "debug" (verbose) messages will stay as is
   - future code debugging will use debug() to debug WIP, therefore not showing to most users if it is accidently left in
This commit is contained in:
zefie
2022-10-16 18:58:30 -04:00
parent b89e0e932c
commit c2a3081afd
91 changed files with 1653 additions and 1694 deletions

View File

@@ -1,7 +1,7 @@
class WTVFlashrom {
fs = require('fs');
https = require('https');
https = require('follow-redirects').https;
use_zefie_server = true;
bf0app_update = false;
service_vaults = new Array();
@@ -129,7 +129,7 @@ class WTVFlashrom {
async getFlashromMeta(request_path, callback) {
// read 512 bytes of rom, and send result of getFlashromInfo
// to callback (in data), without headers
// to callback (in data)
this.getFlashRom(request_path, callback, 512);
}
@@ -164,13 +164,12 @@ 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) {
var data = self.getFlashromInfo(Buffer.from(data_hex, 'hex'), request_path);
} else if (res.statusCode == 404) {
console.log(request_path);
var errpage = self.wtvshared.doErrorPage(404, "The service could not find the requested ROM on zefie's server.")
headers = errpage[0];
var data = errpage[1];