pass code static-check
This commit is contained in:
parent
3fc94b13a0
commit
1553b8c132
1 changed files with 3 additions and 2 deletions
|
@ -55,7 +55,7 @@ local function parse_cookie_expires(expires)
|
||||||
elseif unit == "s" then
|
elseif unit == "s" then
|
||||||
return time
|
return time
|
||||||
else
|
else
|
||||||
return nil, string.format("the unit of expires (%s) is wrong, validated unit includes: y, M, w, d, h, m and s", expires)
|
return nil, string.format("the unit of expires (%s) is wrong", expires)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -73,8 +73,9 @@ local function set_cookie(self, value)
|
||||||
httponly = true,
|
httponly = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local expires
|
||||||
if self.cookie_expires then
|
if self.cookie_expires then
|
||||||
local expires, err = parse_cookie_expires(self.cookie_expires)
|
expires, err = parse_cookie_expires(self.cookie_expires)
|
||||||
if err then
|
if err then
|
||||||
ngx.log(ngx.WARN, string.format("error when parsing cookie expires: %s, ignoring it", tostring(err)))
|
ngx.log(ngx.WARN, string.format("error when parsing cookie expires: %s, ignoring it", tostring(err)))
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue