On Sun, Jul 2, 2017 at 7:51 AM, Peter Dimov via Boost
If "here" is Beast, then perhaps there should be a way to either fix or detect the mistake of forgetting to set the Content-Length.
I don't see how that's possible. We can't fix it, as the message is const& in the serializer (and making it non const means that sending the same message cannot happen concurrently). There's no way to detect the mistake in `serializer`, as the Fields concept provides no mechanism for inspecting the value of fields: http://vinniefalco.github.io/stage/beast/review/beast/concept/Fields.html We could add a way to extract Content-Length to the requirements of FieldsReader: http://vinniefalco.github.io/stage/beast/review/beast/concept/FieldsReader.h... This increases the burden of modeling FieldsReader. I'm reluctant to it because the only use would be to call BOOST_ASSERT for this case. Although seeing that both me and Chris made the same mistake, I might be convinced otherwise.