You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by kv...@apache.org on 2021/04/09 13:43:37 UTC
[apisix] branch master updated: test: show how to fetch special
cookie which is not supported by Nginx (#4011)
This is an automated email from the ASF dual-hosted git repository.
kvn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new d6f3f7a test: show how to fetch special cookie which is not supported by Nginx (#4011)
d6f3f7a is described below
commit d6f3f7ae028ab6de96b400f825557a51b924a781
Author: 罗泽轩 <sp...@gmail.com>
AuthorDate: Fri Apr 9 21:43:27 2021 +0800
test: show how to fetch special cookie which is not supported by Nginx (#4011)
Fix #4009
Signed-off-by: spacewander <sp...@gmail.com>
---
t/core/ctx.t | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/t/core/ctx.t b/t/core/ctx.t
index aab14ce..8ea2022 100644
--- a/t/core/ctx.t
+++ b/t/core/ctx.t
@@ -100,10 +100,13 @@ failed to fetch cookie value by key: cookie_host error: no cookie found in the c
ngx.say("cookie_b: ", ctx.var["cookie_b"])
ngx.say("cookie_c: ", ctx.var["cookie_c"])
ngx.say("cookie_d: ", ctx.var["cookie_d"])
+ ngx.say("cookie with dash and uppercase: ", ngx.var["cookie_X-user-id"])
+ ngx.say("cookie with []: ", ngx.var["cookie_user[id]"])
+ ngx.say("cookie with .: ", ngx.var["cookie_user.id"])
}
}
--- more_headers
-Cookie: a=a; b=bb; c=ccc
+Cookie: a=a; b=bb; c=ccc; X-user-id=2; user[id]=3; user.id=4
--- request
GET /t?a=aaa
--- response_body
@@ -111,6 +114,9 @@ cookie_a: a
cookie_b: bb
cookie_c: ccc
cookie_d: nil
+cookie with dash and uppercase: 2
+cookie with []: 3
+cookie with .: 4
--- no_error_log
[error]