aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/sanity.t16
1 files changed, 13 insertions, 3 deletions
diff --git a/t/sanity.t b/t/sanity.t
index 0899a82..1385ebb 100644
--- a/t/sanity.t
+++ b/t/sanity.t
@@ -235,6 +235,15 @@ Set cookie
ngx.log(ngx.ERR, err)
return
end
+
+ local ok, err = cookie:set({
+ key = "ID", value = "0xf7898",
+ expires = "Wed, 09 Jun 2021 10:18:14 GMT"
+ })
+ if not ok then
+ ngx.log(ngx.ERR, err)
+ return
+ end
ngx.say("Set cookie")
';
}
@@ -242,8 +251,9 @@ Set cookie
GET /t
--- no_error_log
[error]
---- response_headers
-Set-Cookie: Name=Bob; Path=/
-Set-Cookie: Age=20
+--- comment
+because "--- response_headers" does not work with multiple headers with the same
+key, so use "--- raw_response_headers_like" instead
+--- raw_response_headers_like: Set-Cookie: Name=Bob; Path=/\r\nSet-Cookie: Age=20\r\nSet-Cookie: ID=0xf7898; Expires=Wed, 09 Jun 2021 10:18:14 GMT
--- response_body
Set cookie