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
Some web framework sometimes uses "quoted-string" as defined in RFC 2965 as a cookie value and it causes web browsers to send a header like Cookie: my_value_a=x; my_value_b="abc:def:xyz";.
In this case, ctx.cookies.get("my_value_b") returns "abc:def:xyz" rather than abc:def:xyz (no quotes), which is not developer friendly and error-prone when dealing with cookies from other web frameworks.
Since both Django and Express are automatically stripping quotes under the hood (see this PR for details), I think koa should also automatically strip quotes for cookie values.
Some web framework sometimes uses "quoted-string" as defined in RFC 2965 as a cookie value and it causes web browsers to send a header like
Cookie: my_value_a=x; my_value_b="abc:def:xyz";
.In this case,
ctx.cookies.get("my_value_b")
returns"abc:def:xyz"
rather thanabc:def:xyz
(no quotes), which is not developer friendly and error-prone when dealing with cookies from other web frameworks.Since both Django and Express are automatically stripping quotes under the hood (see this PR for details), I think koa should also automatically strip quotes for cookie values.
Possible solutions
cookies
npm package, which is used in koa. If this gets accepted, we can just bump up the version ofcookies
npm package.The text was updated successfully, but these errors were encountered: