gluon-web: fix Http:getcookie()

None of our code uses cookies, so this issue went unnoticed.
This commit is contained in:
Matthias Schiffer 2019-06-16 14:55:23 +02:00
parent 8e00149f11
commit 3ec108aacc
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -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)