2 Jul
2017
2 Jul
'17
1:58 p.m.
On Sun, Jul 2, 2017 at 6:40 AM, Peter Dimov via Boost
This is completely sound from a theoretical design perspective, but forgetting to call prepare_payload will still be very common.
Are there legitimate use cases in which one would send a response lacking Content-Length, with a body that has a known size?
I can't think of one. The only case where a message with a payload omits Content- Length is for HTTP/1.0 responses for which the payload size is unknown. In this case the end of the message is indicated by the end of file / end of stream.