You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
local cookie = require "resty.http_cookie"
local coo = cookie:new()
coo:set({key="test",value="test value"})
next request ,i use coo:get("test") ,it will return "test" not "test value";
ifstate==EXPECT_KEYthenifbyte(text_cookie, j) ==EQUALthenkey=sub(text_cookie, i, j-1)
state=EXPECT_VALUEi=j+1endelseifstate==EXPECT_VALUEthenifbyte(text_cookie, j) ==SEMICOLON--this is the reason code,it use SPACE OR HTAB as a separator,why?orbyte(text_cookie, j) ==SPACEorbyte(text_cookie, j) ==HTABthenvalue=sub(text_cookie, i, j-1)
cookie_table[key] =valuecnt=cnt+1endkey, value=nil, nilstate=EXPECT_SPi=j+1endelseifstate==EXPECT_SPthen
The text was updated successfully, but these errors were encountered:
local cookie = require "resty.http_cookie"
local coo = cookie:new()
coo:set({key="test",value="test value"})
next request ,i use coo:get("test") ,it will return "test" not "test value";
The text was updated successfully, but these errors were encountered: