forked from boostorg/beast
message::version is a member function (API Change):
fix #778 * The version data member is replaced with accessor member functions. Actions Required: * Call member function message::version instead of accessing the version member at call sites.
This commit is contained in:
@@ -115,7 +115,7 @@ handle_request(
|
||||
auto const bad_request =
|
||||
[&req](boost::beast::string_view why)
|
||||
{
|
||||
http::response<http::string_body> res{http::status::bad_request, req.version};
|
||||
http::response<http::string_body> res{http::status::bad_request, req.version()};
|
||||
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
||||
res.set(http::field::content_type, "text/html");
|
||||
res.keep_alive(req.keep_alive());
|
||||
@@ -128,7 +128,7 @@ handle_request(
|
||||
auto const not_found =
|
||||
[&req](boost::beast::string_view target)
|
||||
{
|
||||
http::response<http::string_body> res{http::status::not_found, req.version};
|
||||
http::response<http::string_body> res{http::status::not_found, req.version()};
|
||||
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
||||
res.set(http::field::content_type, "text/html");
|
||||
res.keep_alive(req.keep_alive());
|
||||
@@ -141,7 +141,7 @@ handle_request(
|
||||
auto const server_error =
|
||||
[&req](boost::beast::string_view what)
|
||||
{
|
||||
http::response<http::string_body> res{http::status::internal_server_error, req.version};
|
||||
http::response<http::string_body> res{http::status::internal_server_error, req.version()};
|
||||
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
||||
res.set(http::field::content_type, "text/html");
|
||||
res.keep_alive(req.keep_alive());
|
||||
@@ -182,7 +182,7 @@ handle_request(
|
||||
// Respond to HEAD request
|
||||
if(req.method() == http::verb::head)
|
||||
{
|
||||
http::response<http::empty_body> res{http::status::ok, req.version};
|
||||
http::response<http::empty_body> res{http::status::ok, req.version()};
|
||||
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
||||
res.set(http::field::content_type, mime_type(path));
|
||||
res.content_length(body.size());
|
||||
@@ -194,7 +194,7 @@ handle_request(
|
||||
http::response<http::file_body> res{
|
||||
std::piecewise_construct,
|
||||
std::make_tuple(std::move(body)),
|
||||
std::make_tuple(http::status::ok, req.version)};
|
||||
std::make_tuple(http::status::ok, req.version())};
|
||||
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
||||
res.set(http::field::content_type, mime_type(path));
|
||||
res.content_length(body.size());
|
||||
|
||||
Reference in New Issue
Block a user