update
This commit is contained in:
@@ -38,11 +38,9 @@ function _M.upyun_download(httpc, cjson, Upt, pl, uri)
|
|||||||
resp = ""
|
resp = ""
|
||||||
end
|
end
|
||||||
ngx.log(ngx.ERR, "FAILED TO CONNECT TO *UPYUN*: httpc throws runtime error, please check log. / ", pl.write(resp))
|
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
|
ngx.status = resp.status
|
||||||
-- https://github.com/openresty/lua-resty-redis/issues/15
|
|
||||||
ngx.status = 401
|
|
||||||
ngx.say(cjson.encode({r = false, d = "UpyunDownloadErr"}))
|
ngx.say(cjson.encode({r = false, d = "UpyunDownloadErr"}))
|
||||||
ngx.exit(401)
|
ngx.exit(resp.status)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user