Lesson 10.3
The chunked decoder - pumpBody and framing vs payload
Build pumpBody, the body state machine that streams a content-length or chunked body into the Request, strips every framing byte, and keeps consumed payload out of the accumulator.
What you will build
- Read the RFC 9112 chunked grammar byte by byte and separate framing from payload.
- Decode content-length and chunked bodies in one pump that pushes only payload.
- Reject malformed chunk framing as a 400 and reset the parser cleanly at end-of-body.