def stream.trust
bend-kit-http@0.38.2.0 · http.bend:5124
import bend-kit-http@0.38.2.0/http.bend as Http
import Base
5124
5125def stream.trust(+old: String, cert: Maybe<&2, Cert>, +ca: String, n: Next) -> Next & Maybe<&2, Cert> & String:
5126 match n:
5127 case NGo{left, h}:
5128 Hop{method, +url, headers, body} = h
5129 +same = String.eq(old, redirect.origin(url))
5130 (NGo{left, Hop{method, url, headers, body}}, Bool.pick(Maybe<&2, Cert>, same, cert, None{}), pool.next.ca(same, ca))
5131 case NDone{r}:
5132 (NDone{r}, None{}, "")
5133 case NStop{}:
5134 (NStop{}, None{}, "")