def h2.response.headers
bend-kit-http@0.38.2.0 · http.bend:3210
import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-http2@0.4.0.0/hpack.bend as Hpack
3210def h2.response.headers(xs: List<&2, Hpack.Field>, acc: Map<&2, List<&2, String>>) ->
3211 Map<&2, List<&2, String>>:
3212 match xs:
3213 case Nil{}:
3214 acc
3215 case Con{Hpack.Field{name, value, mode}, tail}:
3216 match name:
3217 case SCon{Chr{58}, rest}:
3218 h2.response.headers(tail, acc)
3219 case other:
3220 h2.response.headers(tail, add(acc, String.to_lower(name), value))