diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-13 11:38:54 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-13 11:38:54 +0100 |
commit | f3e2cb7bfa4517155a2c6675e6310f17d8ca4d89 (patch) | |
tree | ae87e244143d3c0c3cb434ea49f91a3a810a9acc /src/types | |
parent | d4ec11f65d4748167c55a526eacfa63725a7c0a8 (diff) | |
download | chawan-f3e2cb7bfa4517155a2c6675e6310f17d8ca4d89.tar.gz |
cookie: check for domain
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/cookie.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/types/cookie.nim b/src/types/cookie.nim index 807c494f..db5a4de3 100644 --- a/src/types/cookie.nim +++ b/src/types/cookie.nim @@ -113,7 +113,7 @@ proc `$`*(cookiejar: CookieJar): string = let cookie = cookiejar.cookies[i] if cookie.expires <= t: cookiejar.cookies.delete(i) - else: + elif cookie.domain == "" or cookiejar.location.host.endsWith(cookie.domain): result.percentEncode(cookie.name, UserInfoPercentEncodeSet) result &= "=" result.percentEncode(cookie.value, UserInfoPercentEncodeSet) |