1
0
Fork 0
mirror of synced 2024-05-16 10:52:20 +12:00

Add check for client disconnected after curl

This commit is contained in:
nagadomi 2017-07-25 23:23:22 +09:00
parent 7dad4bc9ac
commit 458bea7ca4

View file

@ -308,6 +308,12 @@ function APIHandler:post()
local style = self:get_argument("style", "art")
local download = (self:get_argument("download", "")):len()
if client_disconnected(self) then
self:set_status(400)
self:write("client disconnected")
return
end
if tta_level == 0 then
tta_level = auto_tta_level(x, scale)
end