diff --git a/zefie_wtvp_minisrv/.gitignore b/zefie_wtvp_minisrv/.gitignore
index d4ae3fd9..219e2f47 100644
--- a/zefie_wtvp_minisrv/.gitignore
+++ b/zefie_wtvp_minisrv/.gitignore
@@ -5,6 +5,7 @@
# ServiceLogPost Posted Logs
ServiceLogPost/*_*
+client_sim_tests
# Large files not pertaining to the service code
UserServiceVault/*-*
diff --git a/zefie_wtvp_minisrv/app.js b/zefie_wtvp_minisrv/app.js
index f7d7c46c..246ff6af 100644
--- a/zefie_wtvp_minisrv/app.js
+++ b/zefie_wtvp_minisrv/app.js
@@ -1238,8 +1238,8 @@ function handleProxy(socket, request_type, request_headers, res, data) {
console.warn(` * HTML transformation failed: ${err.message}`);
}
}
-
- if (request_type != "http" && request_type != "https") {
+
+ if (request_type !== "http" && request_type !== "https") {
// replace http and https links on non http/https protocol (for proto:// for example)
const data_t = Buffer.concat(data).toString().replaceAll("http://", request_type + "://").replaceAll("https://", request_type + "://");
data = [Buffer.from(data_t)]
diff --git a/zefie_wtvp_minisrv/client_sim.js b/zefie_wtvp_minisrv/client_sim.js
index e5e25e8b..f5df6da1 100644
--- a/zefie_wtvp_minisrv/client_sim.js
+++ b/zefie_wtvp_minisrv/client_sim.js
@@ -1164,7 +1164,7 @@ class WebTVClientSimulator {
}
// Handle user-id header - indicates successful authentication
- if (headers['user-id']) {
+ if (headers['user-id'] || (headers['wtv-visit'] && headers['wtv-visit'].startsWith('wtv-register:/splash'))) {
this.debugLog(`*** Authentication successful! user-id detected: ${headers['user-id']} ***`);
this.userIdDetected = true;
@@ -1566,7 +1566,7 @@ class WebTVClientSimulator {
let fileContent = fileResult.body;
const contentType = fileResult.headers ? fileResult.headers['content-type'] : '';
const normalizedContentType = contentType.split(';')[0].trim().toLowerCase();
- var isgzip = false;
+ let isgzip = false;
if (normalizedContentType === 'application/gzip' && !this.keepgz) {
this.debugLog(`Decompressing gzip file for ${fileUrl}...`);
@@ -1581,8 +1581,8 @@ class WebTVClientSimulator {
fileContent = fileResult.body;
}
}
-
- var filePath = this.getServicePath(fileUrl, fileResult.headers || {});
+
+ let filePath = this.getServicePath(fileUrl, fileResult.headers || {});
if (isgzip) filePath = filePath.slice(0, -3);
zip.addFile(filePath, fileContent);
downloadedFiles.add(fileUrl);
@@ -1800,9 +1800,9 @@ class WebTVClientSimulator {
// Images and media
/
]+src\s*=\s*["']([^"']+)["'][^>]*>/gi,
/]+src\s*=\s*["']([^"']+)["'][^>]*>/gi,
- /