def hear.counts

emerging-ezhttp@0.21.0.0 · src/http.bend:1726

import emerging-ezhttp@0.21.0.0/src/http.bend as Http
import Base

1726# whether a state can be advanced by a count of octets alone, without their
1727# text: a whole response, a body framed by the close or by Content-Length, or
1728# a chunk's data that still owes at least that many (SPEC.md HTTP-CLI-6)
1729def hear.counts(h: Hear, +m: Nat) -> Bool:
1730  match h:
1731    case Heads{fuel, asked, raw}:
1732      False{}
1733    case Whole{}:
1734      True{}
1735    case Never{}:
1736      True{}
1737    case Count{n, have}:
1738      True{}
1739    case Walking{w}:
1740      walk.counts(w, m)

Uses (4)

Used by (1)