fix crash when handling denied connections
This commit is contained in:
@@ -609,6 +609,7 @@ 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) {
|
||||||
if (socket_sessions[socket.id].request_headers.query) {
|
if (socket_sessions[socket.id].request_headers.query) {
|
||||||
if (socket_sessions[socket.id].wtv_request_type == "download") {
|
if (socket_sessions[socket.id].wtv_request_type == "download") {
|
||||||
if (socket_sessions[socket.id].request_headers.query.dont_compress) {
|
if (socket_sessions[socket.id].request_headers.query.dont_compress) {
|
||||||
@@ -616,6 +617,7 @@ async function sendToClient(socket, headers_obj, data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// compress if needed
|
// compress if needed
|
||||||
if (compression_type > 0 && content_length > 0 && headers_obj['http_response'].substring(0, 3) == "200") {
|
if (compression_type > 0 && content_length > 0 && headers_obj['http_response'].substring(0, 3) == "200") {
|
||||||
|
|||||||
Reference in New Issue
Block a user