serializing file_body is not const

This commit is contained in:
Vinnie Falco
2017-07-20 08:15:30 -07:00
parent e06a055503
commit cc198db10e
7 changed files with 45 additions and 13 deletions
+5 -1
View File
@@ -46,12 +46,16 @@ class write_msg_op
//
beast::http::message<isRequest, Body, Fields> msg;
// Serializer for the message
beast::http::serializer<isRequest, Body, Fields> sr;
data(
Handler& handler,
AsyncWriteStream& stream_,
beast::http::message<isRequest, Body, Fields>&& msg_)
: stream(stream_)
, msg(std::move(msg_))
, sr(msg)
{
boost::ignore_unused(handler);
}
@@ -96,7 +100,7 @@ public:
{
auto& d = *d_;
beast::http::async_write(
d.stream, d.msg, std::move(*this));
d.stream, d.sr, std::move(*this));
}
// Completion handler