From 56ab5228cd6a2af524de7e7fe6b6b8fafd7f3028 Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Mon, 9 Aug 2021 01:51:36 -0400 Subject: [PATCH] fix encryption errors --- zefie_wtvp_minisrv/app.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/zefie_wtvp_minisrv/app.js b/zefie_wtvp_minisrv/app.js index dbb9daeb..da812e78 100644 --- a/zefie_wtvp_minisrv/app.js +++ b/zefie_wtvp_minisrv/app.js @@ -761,16 +761,8 @@ async function sendToClient(socket, headers_obj, data) { } // if box can do compression, see if its worth enabling -<<<<<<< HEAD var compression_type = shouldWeCompress(socket.ssid, headers_obj); if (headers_obj["wtv-modern-content-type"]) delete headers_obj["wtv-modern-content-type"]; -======= - if (ssid_sessions[socket.ssid].capabilities) { - if (ssid_sessions[socket.ssid].capabilities['client-can-receive-compressed-data'] && minisrv_config.config.enable_lzpf_compression) { - compress_data = shouldWeCompress(headers_obj); - } - } ->>>>>>> 6a39cc5... Scratch that. Do what offers better compression over replicating the service. RC4 is too random // compress if needed if (compression_type > 0 && content_length > 0 && headers_obj['http_response'].substring(0,3) == "200") { @@ -817,17 +809,6 @@ async function sendToClient(socket, headers_obj, data) { } } - // encrypt if needed - if (socket_sessions[socket.id].secure == true) { - headers_obj["wtv-encrypted"] = 'true'; - headers_obj = moveObjectElement('wtv-encrypted', 'Connection', headers_obj); - if (clen > 0 && socket_sessions[socket.id].wtvsec) { - if (!zquiet) console.log(" * Encrypting response to client ...") - var enc_data = socket_sessions[socket.id].wtvsec.Encrypt(1, data); - data = enc_data; - } - } - // calculate content length // make sure we are using our Content-length and not one set in a script. if (headers_obj["Content-Length"]) delete headers_obj["Content-Length"];