def cookie.same
import bend-kit-http@0.38.2.0/http.bend as Httpimport Base
2337# Same name, domain, host-only flag and path: the new cookie replaces the old one.
2338def cookie.same(+a: Cookie, +b: Cookie) -> Bool:
2339 Cookie{n1, v1, d1, h1, p1, s1, o1, ss1, e1} = a
2340 Cookie{n2, v2, d2, h2, p2, s2, o2, ss2, e2} = b
2341 Bool.and(Bool.and(String.eq(n1, n2), String.eq(d1, d2)), Bool.and(Bool.not(Bool.xor(h1, h2)), String.eq(p1, p2)))