Entry tags:
Note of pain:
HTTP 1.1, as per RFC 2616, supports no less than three ways of specifying the length of the response to a simple GET request:
- In a Content-Length header, as in HTTP 1.0;
- By means of the header Connection: close, which means
content follows and ends only when we close the connection on you
; - By means of the header Transfer-Encoding: chunked, which means that the message is transferred in chunks, each of which begins with a chunk size—in hex, unlike the decimal representation of Content-Length—and ends with good old CRLFCRLF.