def parse.fields
import bend-kit-http@0.38.2.0/http.bend as Httpimport Base
824# RFC 9112 §3.2: only HTTP/1.1 requires Host.
825def parse.fields(method: String, path: String, rest: String, v11: Bool, fs: Maybe<&2, Map<&2, List<&2, String>>>) -> Got:
826 match fs:
827 case None{}:
828 GotBad{}
829 case Some{+h}:
830 parse.host(method, path, h, rest, Bool.or(Bool.not(v11), has_header(h, "host")))