fix shouldWeCompress for old builds

This commit is contained in:
zefie
2021-08-13 13:10:30 -04:00
3 changed files with 21 additions and 5 deletions

16
BoxConnectingNotes.txt Normal file
View File

@@ -0,0 +1,16 @@
- "Dialing toll-free" (hereby "ANI Number") is usually:
- 18006138199 (production
- 18004653537 (daily)
- 16506944611 (genesis/genpak)
- If you have a enhanced 56k modem setup, do NOT let the ANI Number call answer anything above v34 (33600)
- Production will look for a service at 10.0.0.1, and fall back to 10.0.0.2
- Daily (debug or non-debug) will look for a service at 10.0.128.1
- Builds default to their respective service (eg daily builds will try to connect to 10.0.128.1)
- Once box has a tellyscript, service IP is retained.
- Trigger ANI call by removing and restoring power, and choosing "Moved" or "New Number", don't always need to blast NV
- PO Code 32768 to Blast NVRAM
- PO Code 77437 to override ANI Number (and/or service number)

View File

@@ -40,9 +40,9 @@ class WTVMime {
// if gzip is enabled...
if (this.minisrv_config.config.enable_gzip_compression || this.minisrv_config.config.force_compression_type) {
var is_bf0app = ssid_session.get("wtv-client-rom-type") == "bf0app";
var is_oldBuild = this.wtvshared.isOldBuild(ssid_session);
var isOldBuild = this.wtvshared.isOldBuild(ssid_session);
var is_softmodem = ssid_session.get("wtv-client-rom-type").match(/softmodem/);
if (!is_bf0app && ((!is_softmodem && !is_oldBuild) || (is_softmodem && !is_oldBuild))) {
if (!is_bf0app && ((!is_softmodem && !isOldBuild) || (is_softmodem && !isOldBuild))) {
// softmodem boxes do not appear to support gzip in the minibrowser
// LC2 appears to support gzip even in the MiniBrowser
// LC2 and newer approms appear to support gzip

View File

@@ -632,9 +632,9 @@ async function sendToClient(socket, headers_obj, data) {
break;
case 2:
// zlib gzip implementation
headers_obj['Content-Encoding'] = 'gzip';
data = zlib.gzipSync(data);
// zlib DEFLATE implementation
headers_obj['Content-Encoding'] = 'deflate';
data = zlib.deflateSync(data, { 'level': 9 });
break;
}