3 ms·
Closing the connection would cause the client to believe that the file has been fully downloaded - resulting in a truncated file. Not good. HTTP does not have
by arielb1 10y ago
Closing the connection would cause the client to believe that the file has been fully downloaded - resulting in a truncated file. Not good.
HTTP does not have a way of sending an error in-mid-transfer, so a TCP reset has to suffice. The other option would be to blackhole the connection, but that would be worse for both sides.
- nunwuo 10y ago> Closing the connection would cause the client to believe that the file has been fully downloaded - resulting in a truncated file. Not good. That's not correct. Both Content-Length and the chunked encoding scheme would allow the client to know that the connection was terminated before the end of stream was reached.