diff options
author | bptato <nincsnevem662@gmail.com> | 2024-12-28 20:56:28 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-12-28 21:03:08 +0100 |
commit | 4a16faf8a87266aec6fecfae29664838ea01c172 (patch) | |
tree | d329d00d7d9c9753c7565a80eb6fd7be9b850ac6 /src | |
parent | 6a627ab38cabe0543d961a190b59dcfac622ce90 (diff) | |
download | chawan-4a16faf8a87266aec6fecfae29664838ea01c172.tar.gz |
cookie: remove redundant check
This only resulted in false negatives; seems like it's a remnant from the old, non-standard implementation that did not correctly check for the per-cookie domain. (also, fix a strict def)
Diffstat (limited to 'src')
-rw-r--r-- | src/types/cookie.nim | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/types/cookie.nim b/src/types/cookie.nim index 831d7464..ee287004 100644 --- a/src/types/cookie.nim +++ b/src/types/cookie.nim @@ -110,7 +110,7 @@ proc parseCookieDate(val: string): Option[int64] = # For debugging proc `$`*(cookieJar: CookieJar): string = - result &= $cookieJar.domain + result = $cookieJar.domain result &= ":\n" for cookie in cookieJar.cookies: result &= "Cookie " @@ -176,8 +176,6 @@ proc add(cookieJar: CookieJar; cookie: Cookie) = # https://www.rfc-editor.org/rfc/rfc6265#section-5.4 proc serialize*(cookieJar: CookieJar; url: URL): string = - if not cookieJar.domain.cookieDomainMatches(url): - return "" var res = "" let t = getTime().toUnix() #TODO sort |