object HttpCookieRules
source · line 10public
public object HttpCookieRules
Pure helpers for schemeful site, domain, and cookie-path matching.
function pathMatches
source · line 53public
public fun pathMatches(requestPath: List<Byte>, cookiePath: List<Byte>): Boolean
Compares encoded paths with cookie slash-boundary semantics, without percent decoding.
parameter cookiePath
source · line 53public
cookiePath: List<Byte>
parameter requestPath
source · line 53public
requestPath: List<Byte>
function sameSite
source · line 15public
public fun sameSite(first: UrlOrigin, second: UrlOrigin, suffixes: PublicSuffixList): Boolean
Compares schemeful registrable domains using the suffix list; ws/wss map to http/https respectively.
parameter suffixes
source · line 15public
suffixes: PublicSuffixList
parameter first
source · line 15public
first: UrlOrigin
parameter second
source · line 15public
second: UrlOrigin
function domainMatches
source · line 26public
public fun domainMatches(host: UrlHost, domain: UrlHost): Boolean
Checks an exact host or DNS suffix at a label boundary; IP hosts require exact equality.
parameter host
source · line 26public
host: UrlHost
parameter domain
source · line 26public
domain: UrlHost
function pathMatches
source · line 62public
public fun pathMatches(requestPath: String, cookiePath: String): Boolean
Compares encoded paths with cookie slash-boundary semantics, without percent decoding.
parameter cookiePath
source · line 62public
cookiePath: String
parameter requestPath
source · line 62public
requestPath: String
function defaultPath
source · line 48public
public fun defaultPath(encodedPath: String): Array<Byte>
Derives the cookie default path from the request's encoded path, falling back to /.
parameter encodedPath
source · line 48public
encodedPath: String
function defaultPath
source · line 38public
public fun defaultPath(encodedPath: List<Byte>): Array<Byte>
Derives the cookie default path from the request's encoded path, falling back to /.
parameter encodedPath
source · line 38public
encodedPath: List<Byte>