diff --git a/include/beast/http/impl/message_v1.ipp b/include/beast/http/impl/message_v1.ipp index d0b69e4e..e2a2568d 100644 --- a/include/beast/http/impl/message_v1.ipp +++ b/include/beast/http/impl/message_v1.ipp @@ -8,6 +8,7 @@ #ifndef BEAST_HTTP_IMPL_MESSAGE_V1_IPP #define BEAST_HTTP_IMPL_MESSAGE_V1_IPP +#include #include #include #include @@ -87,7 +88,11 @@ prepare_content_length(prepare_info& pi, std::true_type) { typename Body::writer w(msg); - //w.init(ec); // VFALCO This is a design problem! + // VFALCO This is a design problem! + error_code ec; + w.init(ec); + if(ec) + throw system_error{ec}; pi.content_length = w.content_length(); }