From 4a16faf8a87266aec6fecfae29664838ea01c172 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 28 Dec 2024 20:56:28 +0100 Subject: 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) --- src/types/cookie.nim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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 -- cgit