Before you start. This series builds a small copy of a web server: a program that listens on the network, reads a request, and sends back an answer. The toy can already read the first line of a request and its labelled fields, and it knows exactly where that part stops, because Parse The Request (HTTP) taught it to find the blank line that ends it. This lesson picks up right there, on whatever bytes arrive after that blank line.
Lesson 16 of 117 in From Scratch
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
Or start free: a free account opens lessons 2 and 3 of every track.
In this lesson
2014: a length nobody checked
The blank line has no matching blank at the other end
Three ways to say how much is left
When two readers disagree
Never trust the number blindly
The body reader
What running it caught
The problem this board leaves behind
The one thing
Terms it explains: body, Content-Length, Chunked, Close-delimited, request smuggling, request, 413 (Content Too Large), `Expect: 100-continue`, test data, Content-Length: N.