From 9f08e5d317f3dccefd7185d6b55e33d554547d51 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 8 Dec 2023 05:36:31 +1100 Subject: [PATCH] AP_Scripting: use sendfile() in web server --- libraries/AP_Scripting/applets/net_webserver.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_Scripting/applets/net_webserver.lua b/libraries/AP_Scripting/applets/net_webserver.lua index 284dae8201..52c5dcce27 100644 --- a/libraries/AP_Scripting/applets/net_webserver.lua +++ b/libraries/AP_Scripting/applets/net_webserver.lua @@ -566,6 +566,8 @@ local function Client(_sock, _idx) elseif cgi_processing then DEBUG(string.format("%u: CGI processing %s", idx, path)) run = self.send_cgi + elseif sock:sendfile(file) then + return true else run = self.send_file end