def jar.string
import bend-kit-http@0.38.2.0/http.bend as Httpimport Base
import bend-kit-url@0.4.1.0/url.bend as Url
2431# §5.8.3: the cookie-string for a request to a, or "" when no cookie matches.
2432def jar.string(j: Jar, a: Url.Abs) -> String:
2433 Jar{now, cs} = j
2434 Url.Abs{scheme, +host, port, target} = a
2435 String.join(cookie.pairs(List.sort(~Cookie, ~cookie.longer, cookie.pick(cs, host, cookie.target_path(target), String.eq(scheme, "https")))), "; ")