Fix the build
I don't feel like breaking these out at the moment or writing a commit
message. This fixes the build for clang-tidy. If anyone wants to break
these out with appropriate commit messages, feel free.
Change-Id: Id0b65d238dfb9b8036c0ffddf2f32d221e5988c2
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 5277981..955cb34 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -630,16 +630,17 @@
BMCWEB_LOG_ERROR("Parser was unexpectedly null");
return;
}
+ auto& parse = *parser;
+ const auto& value = parser->get();
if (authenticationEnabled)
{
- boost::beast::http::verb method = parser->get().method();
+ boost::beast::http::verb method = value.method();
userSession = authentication::authenticate(
- ip, res, method, parser->get().base(), mtlsSession);
+ ip, res, method, value.base(), mtlsSession);
}
- std::string_view expect =
- parser->get()[boost::beast::http::field::expect];
+ std::string_view expect = value[boost::beast::http::field::expect];
if (bmcweb::asciiIEquals(expect, "100-continue"))
{
res.result(boost::beast::http::status::continue_);
@@ -652,9 +653,9 @@
return;
}
- parser->body_limit(getContentLengthLimit());
+ parse.body_limit(getContentLengthLimit());
- if (parser->is_done())
+ if (parse.is_done())
{
handle();
return;
@@ -749,18 +750,19 @@
{
return;
}
+ auto& parse = *parser;
startDeadline();
if (httpType == HttpType::HTTP)
{
boost::beast::http::async_read_some(
- adaptor.next_layer(), buffer, *parser,
+ adaptor.next_layer(), buffer, parse,
std::bind_front(&self_type::afterRead, this,
shared_from_this()));
}
else
{
boost::beast::http::async_read_some(
- adaptor, buffer, *parser,
+ adaptor, buffer, parse,
std::bind_front(&self_type::afterRead, this,
shared_from_this()));
}