catch error

This commit is contained in:
zefie
2021-08-11 11:04:25 -04:00
parent 265a96689a
commit 181d276820

View File

@@ -575,10 +575,14 @@ async function sendToClient(socket, headers_obj, data) {
}
// Add last modified if not a dynamic script
if (socket_sessions[socket.id]) {
if (socket_sessions[socket.id].request_headers) {
if (wtvshared.getFileExt(socket_sessions[socket.id].request_headers.service_file_path).toLowerCase() !== "js") {
var last_modified = wtvshared.getFileLastModifiedUTCString(socket_sessions[socket.id].request_headers.service_file_path);
if (last_modified) headers_obj["Last-Modified"] = last_modified;
}
}
}
// if box can do compression, see if its worth enabling
// small files actually get larger, so don't compress them