1. Any response message which MUST NOT include a message body
(such as the 1xx, 204, and 304 responses) is always terminated
by the first empty line after the header fields, regardless of
the entity-header fields present in the message. (Note: An
empty line consists of only CRLF.)
2. If a Content-Length header field section 12.14 is present,
its value in bytes represents the length of the message-body.
If this header field is not present, a value of zero is
assumed.
3. By the server closing the connection. (Closing the connection
cannot be used to indicate the end of a request body, since
that would leave no possibility for the server to send back a
response.)
From RFC 2326 - Section 4.4 Message Length: