Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 03 · From Scratch · HTTP Server · with code: Go · about 18 min to read

Play it as a journeyTutor comes with a plan

HTTP 01: The Raw Socket

The Raw Socket
The Raw Socket · Open board

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.

See plansAlready a member? Sign in

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.

Review From Scratch