| 95 | } |
| 96 | |
| 97 | void |
| 98 | init(boost::optional< |
| 99 | std::uint64_t> const& length, error_code& ec) |
| 100 | { |
| 101 | if(length) |
| 102 | { |
| 103 | if(*length > body_.max_size()) |
| 104 | { |
| 105 | BOOST_BEAST_ASSIGN_EC(ec, error::buffer_overflow); |
| 106 | return; |
| 107 | } |
| 108 | body_.reserve(beast::detail::clamp(*length)); |
| 109 | } |
| 110 | ec = {}; |
| 111 | } |
| 112 | |
| 113 | template<class ConstBufferSequence> |
| 114 | std::size_t |