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 20 min to read

Play it as a journeyTutor comes with a plan

Parse The Request (HTTP)

Parse The Request
Parse The Request · Open board

The stage of the From Scratch HTTP build right after opening a connection.

Before you start. This series builds a small copy of an HTTP server, the program that answers when a browser or a tool like curl asks a website for a page. The last stage opened a socket, the two-way connection a browser and a server talk over, and read whatever raw bytes (the raw chunks of data a network hands over, with no meaning attached yet) arrived off it without understanding a single one of them. This stage is where those bytes finally become a request the program can act on.

Lesson 15 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

  • 2005: two machines that read the same bytes and disagree
  • The shape: a form with a blank line at the bottom
  • Why a blank line is worse than a number
  • The trap: bytes arrive in pieces
  • The bug that shipped once, and the three-character fix
  • Two parsers, one message, and the disagreement Klein wrote up

Terms it explains: index into the buffer, not, one at a time, and close the connection.

Review From Scratch