The stage that turns the four socket calls into a real HTTP reply, and decides when to hang up on a caller who never finishes talking.
Before you start. This series builds a small HTTP server, a program that answers a browser’s request for a page the same way every real website already does. You already opened a real, ordered line between two programs, in Redis 01: The Socket That Answers : a program that waits for other programs to connect, then talks with each one over that connection. That part is reused here unchanged. Only what gets said once the call connects is new.
Lesson 14 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
1991: HTTP/0.9, a request with nothing in it but one line
The reply becomes a response, with headers of its own
Six lines to the same receptionist
The caller who never says hello: slowloris, and the deadline that stops it
Terms it explains: request, response, headers, slowloris, deadline, status line, header, blank line, body, read deadline, absolute instant, budget for one phase, connection is still writable, listing above.