Index

Module 03 · From ScratchHTTP Server

HTTP 08: Everything

Everything
Everything · Open board

The finale board. No new mechanism: one ordinary request, followed through everything this build has already made, closing the build begun in Build Your Own HTTP Server - From Scratch.

Before you start. This series has been building a small HTTP server, a program that answers a browser’s request for a page the same way every real website does. By now it can do seven things, one per earlier lesson:

  • Hang up on a caller who never finishes asking, instead of waiting forever.
  • Find where a request’s opening line and labels end, even when the bytes (single characters, roughly) arrive in pieces.
  • Work out whether anything follows those labels, and how long it runs.
  • Send an address like /users/42 to the right piece of code.
  • Keep the line open and answer a second request on it.
  • Refuse to hold more than so many lines open, so a flood cannot sink it.
  • Send back a reply whose length it doesn’t know yet, piece by piece.

This lesson adds no new piece: it sends one ordinary request through all seven, in order.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Review From Scratch →

Saved in this browser, and to your account when you sign in.