Chunked transfer-coding

Chunked transfer-coding, also known as chunking, involves transferring the body of a message as a series of chunks, each with its own chunk size header. The end of the message is indicated by a chunk with zero length and an empty line.

This topic briefly summarizes chunked transfer-coding. To use chunked transfer-coding, both the client and server must be using HTTP/1.1. For details, see the HTTP/1.1 specification (RFC 2616).

This defined process means that an application-generated entity body, or a large entity body, can be sent in convenient segments. The client or server knows that the chunked message is complete when the zero length chunk is received.

The body of a chunked message can be followed by an optional trailer that contains supplementary HTTP headers, known as trailing headers. Clients and servers are not required to accept trailers, so the supplementary HTTP headers provides only nonessential information, unless a server knows that a client accepts trailers.



dfhtl_httpchunking.html | Timestamp icon Last updated: Thursday, 27 June 2019