def cookie.max_age.cap

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

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

2186# More than 9 significant digits is past the limit (and would overflow parse_u32).
2187def cookie.max_age.cap(long: Bool, m: Maybe<&2, U32>) -> Maybe<&2, U32>:
2188  match m:
2189    case None{}:
2190      None{}
2191    case Some{s}:
2192      Some{Bool.pick(U32, long, cookie.limit(), s)}

Uses (5)

Used by (1)