forked from boostorg/beast
message::body is a member function (API Change):
fix #778 * The body data member is replaced with accessor member functions. Actions Required: * Call member function message::body instead of accessing the data member at call sites.
This commit is contained in:
@@ -120,7 +120,7 @@ handle_request(
|
||||
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
||||
res.set(http::field::content_type, "text/html");
|
||||
res.keep_alive(req.keep_alive());
|
||||
res.body = why.to_string();
|
||||
res.body() = why.to_string();
|
||||
res.prepare_payload();
|
||||
return res;
|
||||
};
|
||||
@@ -133,7 +133,7 @@ handle_request(
|
||||
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
||||
res.set(http::field::content_type, "text/html");
|
||||
res.keep_alive(req.keep_alive());
|
||||
res.body = "The resource '" + target.to_string() + "' was not found.";
|
||||
res.body() = "The resource '" + target.to_string() + "' was not found.";
|
||||
res.prepare_payload();
|
||||
return res;
|
||||
};
|
||||
@@ -146,7 +146,7 @@ handle_request(
|
||||
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
||||
res.set(http::field::content_type, "text/html");
|
||||
res.keep_alive(req.keep_alive());
|
||||
res.body = "An error occurred: '" + what.to_string() + "'";
|
||||
res.body() = "An error occurred: '" + what.to_string() + "'";
|
||||
res.prepare_payload();
|
||||
return res;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user