If my HTTP server receives an HTTP / 1.0 request with the heading "Connection: keep-alive", can I say that the client will understand "Transfer-Encoding: chunked"?
Essentially, I'm trying to decide whether to respect the "Connection: keep-alive" header from HTTP / 1.0 clients. If I read it, then I have to use the encoding for the response, because I cannot buffer the entire response to calculate the Content-Length header.
If it is unsafe to expect that the HTTP / 1.0 client that requests “Connection: keep-alive” will also understand the encoding, then I will have to close the connection after each response. (Or am I missing something?)
source
share