diff options
Diffstat (limited to 'lib/httplib.lua')
-rw-r--r-- | lib/httplib.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/httplib.lua b/lib/httplib.lua index 42c42a6..26d66bd 100644 --- a/lib/httplib.lua +++ b/lib/httplib.lua @@ -59,8 +59,8 @@ function get_cookies(req) local k, v for k, v in pairs(cookie_strings) do - local cname, cvalue = string.match(v, "(%w+)=(.+)") - cookies[cname] = cvalue + local cname, cvalue = string.match(v, "(%[^=]+)=(.+)") + if cname then cookies[trim(cname)] = trim(cvalue) end end end return cookies |