def whole.step
import emerging-ezhttp@0.21.0.0/src/http.bend as Httpimport Base
1358# a head that is interim: whole when what follows is; else whole under the
1359# framing it gives
1360def whole.step(asked: Bool, +ls: List<&2, String>, +after: String,
1361 interim: Bool, rest: Cut -> Bool) -> Bool:
1362 match interim:
1363 case True{}:
1364 rest(divide(after, "\r\n\r\n"))
1365 case False{}:
1366 whole.of(frame(Bool.or(asked, status.bare(status.of(ls))),
1367 head.go(ls, "transfer-encoding"), head.values(ls, "content-length")),
1368 after)