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

Play it as a journeyTutor comes with a plan

HTTP 03: Frame The Body

Frame The Body
Frame The Body · Open board

From Scratch · HTTP Server. Follows Parse The Request (HTTP), which stopped at the blank line, and hands off to HTTP 04: Routing and Response.

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.

See plansAlready a member? Sign in

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.

Review From Scratch