def abs.hostport

bend-kit-url@0.4.1.0 · url.bend:344

import bend-kit-url@0.4.1.0/url.bend as Url
import Base

344# Bracket-free host in Abs; only the authority and Host field carry brackets.
345def abs.hostport(scheme: String, dflt: Maybe<&2, U32>, hp: String & String, rest: String) -> Maybe<&2, Abs>:
346  (+host, ps) = hp
347  abs.hostok(scheme, String.to_lower(host), abs.port(ps, dflt), rest, Bool.not(Bool.or(String.is_empty(host), String.starts_with(host, "["))))

Uses (13)

Used by (1)