forked from boostorg/beast
Fixes for gcc-4.8
This commit is contained in:
@@ -4,6 +4,7 @@ Version 73:
|
|||||||
* Verify certificates in SSL clients
|
* Verify certificates in SSL clients
|
||||||
* Adjust benchmarks
|
* Adjust benchmarks
|
||||||
* Initialize local variable in basic_parser
|
* Initialize local variable in basic_parser
|
||||||
|
* Fixes for gcc-4.8
|
||||||
|
|
||||||
HTTP:
|
HTTP:
|
||||||
|
|
||||||
|
@@ -73,7 +73,7 @@ private:
|
|||||||
void
|
void
|
||||||
read_request()
|
read_request()
|
||||||
{
|
{
|
||||||
auto self{shared_from_this()};
|
auto self = shared_from_this();
|
||||||
|
|
||||||
http::async_read(
|
http::async_read(
|
||||||
socket_,
|
socket_,
|
||||||
@@ -160,7 +160,7 @@ private:
|
|||||||
void
|
void
|
||||||
write_response()
|
write_response()
|
||||||
{
|
{
|
||||||
auto self{shared_from_this()};
|
auto self = shared_from_this();
|
||||||
|
|
||||||
response_.set(http::field::content_length, response_.body.size());
|
response_.set(http::field::content_length, response_.body.size());
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@ private:
|
|||||||
void
|
void
|
||||||
check_deadline()
|
check_deadline()
|
||||||
{
|
{
|
||||||
auto self{shared_from_this()};
|
auto self = shared_from_this();
|
||||||
|
|
||||||
deadline_.async_wait(
|
deadline_.async_wait(
|
||||||
[self](beast::error_code ec)
|
[self](beast::error_code ec)
|
||||||
|
@@ -99,7 +99,7 @@ private:
|
|||||||
|
|
||||||
// Return a file response to an HTTP GET request
|
// 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,
|
get(boost::filesystem::path const& full_path,
|
||||||
beast::error_code& ec) const
|
beast::error_code& ec) const
|
||||||
{
|
{
|
||||||
@@ -109,7 +109,7 @@ private:
|
|||||||
res.set(http::field::connection, "close");
|
res.set(http::field::connection, "close");
|
||||||
res.body.open(full_path, "rb", ec);
|
res.body.open(full_path, "rb", ec);
|
||||||
if(ec)
|
if(ec)
|
||||||
return boost::none;
|
return res;
|
||||||
res.set(beast::http::field::content_length, res.body.size());
|
res.set(beast::http::field::content_length, res.body.size());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ private:
|
|||||||
else if(ec)
|
else if(ec)
|
||||||
http::write(sock_, server_error(file_ec), ec);
|
http::write(sock_, server_error(file_ec), ec);
|
||||||
else
|
else
|
||||||
http::write(sock_, std::move(*res), ec);
|
http::write(sock_, std::move(res), ec);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -247,7 +247,7 @@ private:
|
|||||||
if(ec)
|
if(ec)
|
||||||
return boost::none;
|
return boost::none;
|
||||||
res.set(beast::http::field::content_length, res.body.size());
|
res.set(beast::http::field::content_length, res.body.size());
|
||||||
return res;
|
return {std::move(res)};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return a response to an HTTP HEAD request
|
// Return a response to an HTTP HEAD request
|
||||||
@@ -270,7 +270,7 @@ private:
|
|||||||
if(ec)
|
if(ec)
|
||||||
return boost::none;
|
return boost::none;
|
||||||
res.set(beast::http::field::content_length, body.size());
|
res.set(beast::http::field::content_length, body.size());
|
||||||
return res;
|
return {std::move(res)};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user