apply system-wide dont_compress query to only wtv downloads
This commit is contained in:
@@ -610,10 +610,12 @@ async function sendToClient(socket, headers_obj, data) {
|
|||||||
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.query) {
|
||||||
|
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) {
|
||||||
compression_type = 0;
|
compression_type = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 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