update
This commit is contained in:
@@ -38,11 +38,9 @@ function _M.upyun_download(httpc, cjson, Upt, pl, uri)
|
||||
resp = ""
|
||||
end
|
||||
ngx.log(ngx.ERR, "FAILED TO CONNECT TO *UPYUN*: httpc throws runtime error, please check log. / ", pl.write(resp))
|
||||
-- 必须先设置ngx.status,否则ngx.say之后就直接被设置为200了,不会再被exit设为401
|
||||
-- https://github.com/openresty/lua-resty-redis/issues/15
|
||||
ngx.status = 401
|
||||
ngx.status = resp.status
|
||||
ngx.say(cjson.encode({r = false, d = "UpyunDownloadErr"}))
|
||||
ngx.exit(401)
|
||||
ngx.exit(resp.status)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user