end
if cbs.on_header then
- cbs.on_header(file, code, resp)
+ local stat = {cbs.on_header(file, code, resp)}
+ if stat[1] == false then
+ file:close()
+ sock:close()
+ return true, nil, nil, unpack(stat, 2)
+ end
end
local chunked = resp.headers["Transfer-Encoding"] == "chunked"