def after.line

bend-kit-multipart@0.3.0.0 · multipart.bend:436

import bend-kit-multipart@0.3.0.0/multipart.bend as Multipart
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

436# After: suffix already saw "--" or padding then CRLF, so both are in buf. "--" closes the body.
437# The CRLF stays in buf, so the header block is found as CRLF ... CRLF CRLF, empty or not.
438def after.line(r: Bytes.Bytes & Maybe<&2, U32>, out: List<&1, Item>) -> Step:
439  (buf, hit) = r
440  match hit:
441    case Some{+i}:
442      More{Heads{}, drop(buf, i), out}
443    case None{}:
444      wait.big(After{}, Bytes.length(buf), out)

Uses (12)

Used by (1)