Index

Module 03 · From ScratchHTTP Server

HTTP 07: Chunked Encoding

Chunked Encoding
Chunked Encoding · Open board

From Scratch · HTTP Server. Follows HTTP Server: Concurrency, and hands off to HTTP 08: Everything.

Before you start. This series builds a small copy of a web server: a program that listens on the network for a request - a short message asking for something - and sends back an answer. Your toy can already find where one request’s content, its body, begins and ends: an earlier stage taught it to read a labelled line at the top of the message, a header, called Content-Length - the sender writes down, in advance, exactly how many bytes (roughly one per typed character) of body are coming, so the toy reads that many and stops. The toy also now serves many visitors at once without one slow one freezing out the rest, which is what makes it worth keeping a connection open for a long time in the first place (HTTP Server: Concurrency). This lesson is about the one case Content-Length cannot cover: when the sender does not yet know how many bytes there will be.

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.