def cookie.expiry

bend-kit-http@0.38.2.0 · http.bend:2304

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-time@0.3.0.0/time.bend as Time

2304# Max-Age wins over Expires, whatever their order (§5.7 step 6). Both count from now.
2305def cookie.expiry(+now: Time.Instant, m: Maybe<&2, U32>, e: Maybe<&2, Time.Instant>) -> Maybe<&2, Time.Instant>:
2306  Maybe.or(&2, Time.Instant, cookie.max_age.at(now, m), cookie.expires.cap(now, e))

Uses (6)

Used by (1)