Files
minisrv/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/initiate-lc2-download.js
zefie c2a3081afd v0.9.36
- 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
2022-11-29 08:29:31 -05:00

22 lines
936 B
JavaScript

var minisrv_service_file = true;
if (request_headers.query.path) {
var url = service_name + ":/get-lc2-page?path=" + request_headers.query.path;
var romtype = session_data.get("wtv-client-rom-type");
if (romtype == "bf0app") {
url = "client:updateflash?ipaddr=" + minisrv_config.services[service_name].host + "&port=" + minisrv_config.services[service_name].port + "&path=" + escape(service_name + ":/" + request_headers.query.path);
if (request_headers.query.numparts) url += escape("?numparts=" + request_headers.query.numparts);
} else {
if (request_headers.query.numparts) url += "&numparts=" + request_headers.query.numparts;
}
headers = "300 OK\n";
headers += "minisrv-no-mail-count: true\n";
headers += "wtv-visit: " + url + "\n";
headers += "Location: " + url + "\n";
headers += "Content-type: text/html";
data = '';
} else {
var errpage = wtvshared.doErrorPage(400)
headers = errpage[0];
data = errpage[1];
}