remove unused file, fix ngx.exit status issue

This commit is contained in:
moicen
2022-07-06 20:14:53 +08:00
parent af95a54aa1
commit 620bf59ccf
3 changed files with 5 additions and 206 deletions
+4
View File
@@ -45,6 +45,10 @@ local function create_task(httpc, task_text, authHeader, sudoerToken)
ngx.log(ngx.ERR, "TASK CREATE *FAILED*", res.body)
end
-- 必须先显示设置ngx.status,因为ngx.say会默认设置status为200
-- 后面再在ngx.exit里指定status就会出现冲突,报下面错误:
-- attempt to set status 401 via ngx.exit after sending out the response status 200
ngx.status = res.status
ngx.say(res.body)
ngx.exit(res.status)