forked from boostorg/beast
Fixes for gcc-4.8
This commit is contained in:
1 parent
abdd89fde8
commit
37461a1c4c
4 files changed
+9
-8
No files matched your search
@@ -73,7 +73,7 @@ private:
|
||||
void
|
||||
read_request()
|
||||
{
|
||||
auto self{shared_from_this()};
|
||||
auto self = shared_from_this();
|
||||
|
||||
http::async_read(
|
||||
socket_,
|
||||
@@ -160,7 +160,7 @@ private:
|
||||
void
|
||||
write_response()
|
||||
{
|
||||
auto self{shared_from_this()};
|
||||
auto self = shared_from_this();
|
||||
|
||||
response_.set(http::field::content_length, response_.body.size());
|
||||
|
||||
@@ -178,7 +178,7 @@ private:
|
||||
void
|
||||
check_deadline()
|
||||
{
|
||||
auto self{shared_from_this()};
|
||||
auto self = shared_from_this();
|
||||
|
||||
deadline_.async_wait(
|
||||
[self](beast::error_code ec)
|
||||
|
||||
@@ -99,7 +99,7 @@ private:
|
||||
|
||||
// Return a file response to an HTTP GET request
|
||||
//
|
||||
boost::optional<beast::http::response<file_body>>
|
||||
beast::http::response<file_body>
|
||||
get(boost::filesystem::path const& full_path,
|
||||
beast::error_code& ec) const
|
||||
{
|
||||
@@ -109,7 +109,7 @@ private:
|
||||
res.set(http::field::connection, "close");
|
||||
res.body.open(full_path, "rb", ec);
|
||||
if(ec)
|
||||
return boost::none;
|
||||
return res;
|
||||
res.set(beast::http::field::content_length, res.body.size());
|
||||
return res;
|
||||
}
|
||||
@@ -146,7 +146,7 @@ private:
|
||||
else if(ec)
|
||||
http::write(sock_, server_error(file_ec), ec);
|
||||
else
|
||||
http::write(sock_, std::move(*res), ec);
|
||||
http::write(sock_, std::move(res), ec);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -247,7 +247,7 @@ private:
|
||||
if(ec)
|
||||
return boost::none;
|
||||
res.set(beast::http::field::content_length, res.body.size());
|
||||
return res;
|
||||
return {std::move(res)};
|
||||
}
|
||||
|
||||
// Return a response to an HTTP HEAD request
|
||||
@@ -270,7 +270,7 @@ private:
|
||||
if(ec)
|
||||
return boost::none;
|
||||
res.set(beast::http::field::content_length, body.size());
|
||||
return res;
|
||||
return {std::move(res)};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user