Sergey Akhapkin07/05/2019, 2:21 PM
How it's possible to set cookie without 'maxage' - per standard, it means the lifetime of cookie is restricted by lifetime of client ?
data class Cookie( val name: String, val value: String, val encoding: CookieEncoding = CookieEncoding.URI_ENCODING, val maxAge: Int = 0,
spand07/05/2019, 2:30 PM
Sergey Akhapkin07/05/2019, 2:35 PM
spand07/05/2019, 2:37 PM
Set-Cookie: <cookie-name>=<cookie-value>; Max-Age=<non-zero-digit>
tipsy07/05/2019, 2:40 PM
Sergey Akhapkin07/05/2019, 2:44 PM
5.2.2. The Max-Age Attribute ... Let delta-seconds be the attribute-value converted to an integer. If delta-seconds is less than or equal to zero (0), let expiry-time be the earliest representable date and time. Otherwise, let the expiry-time be the current date and time plus delta-seconds seconds.
However 5.2.2. states that result can be zero.
max-age-av = "Max-Age=" non-zero-digit *DIGIT ; In practice, both expires-av and max-age-av ; are limited to dates representable by the ; user agent. non-zero-digit = %x31-39 ; digits 1 through 9