HTTP specification (RFC2616) has the following phrase:
If a Transfer-Encoding header field (section 14.41) is present and has any value other than "identity", then the transfer-length is defined by use of the "chunked" transfer-coding (section 3.6), unless the message is terminated by closing the connection.
How can I detect that the message is "terminated by closing the connection"? Is it enough to check the "Connection" field for value "close"?