fix crash when handling denied connections
This commit is contained in:
@@ -609,10 +609,12 @@ async function sendToClient(socket, headers_obj, data) {
|
|||||||
// small files actually get larger, so don't compress them
|
// small files actually get larger, so don't compress them
|
||||||
var compression_type = 0;
|
var compression_type = 0;
|
||||||
if (content_length >= 256) compression_type = wtvmime.shouldWeCompress(ssid_sessions[socket.ssid], headers_obj);
|
if (content_length >= 256) compression_type = wtvmime.shouldWeCompress(ssid_sessions[socket.ssid], headers_obj);
|
||||||
if (socket_sessions[socket.id].request_headers.query) {
|
if (socket_sessions[socket.id].request_headers) {
|
||||||
if (socket_sessions[socket.id].wtv_request_type == "download") {
|
if (socket_sessions[socket.id].request_headers.query) {
|
||||||
if (socket_sessions[socket.id].request_headers.query.dont_compress) {
|
if (socket_sessions[socket.id].wtv_request_type == "download") {
|
||||||
compression_type = 0;
|
if (socket_sessions[socket.id].request_headers.query.dont_compress) {
|
||||||
|
compression_type = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user