5
0
mirror of https://github.com/ArduPilot/ardupilot synced 2025-01-08 17:08:28 -04:00

AP_Scripting: use sendfile() in web server

This commit is contained in:
Andrew Tridgell 2023-12-08 05:36:31 +11:00
parent 1e1255c8f0
commit 9f08e5d317

View File

@ -566,6 +566,8 @@ local function Client(_sock, _idx)
elseif cgi_processing then elseif cgi_processing then
DEBUG(string.format("%u: CGI processing %s", idx, path)) DEBUG(string.format("%u: CGI processing %s", idx, path))
run = self.send_cgi run = self.send_cgi
elseif sock:sendfile(file) then
return true
else else
run = self.send_file run = self.send_file
end end