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
1 changed files with 2 additions and 0 deletions

View File

@ -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