gluon-web: fix Http:getcookie()
None of our code uses cookies, so this issue went unnoticed.
This commit is contained in:
parent
8e00149f11
commit
3ec108aacc
@ -56,7 +56,7 @@ function Http:getcookie(name)
|
|||||||
local c = string.gsub(";" .. (self:getenv("HTTP_COOKIE") or "") .. ";", "%s*;%s*", ";")
|
local c = string.gsub(";" .. (self:getenv("HTTP_COOKIE") or "") .. ";", "%s*;%s*", ";")
|
||||||
local p = ";" .. name .. "=(.-);"
|
local p = ";" .. name .. "=(.-);"
|
||||||
local i, j, value = c:find(p)
|
local i, j, value = c:find(p)
|
||||||
return value and urldecode(value)
|
return value and protocol.urldecode(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Http:getenv(name)
|
function Http:getenv(name)
|
||||||
|
Loading…
Reference in New Issue
Block a user