mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Handle boost::beast::http::basic_fields#operator[]() signature change (v1.81)
Use always working std::string(x), not broken x.to_string(). (x is a return value.)
This commit is contained in:
parent
68198f2ef9
commit
f84ffdad68
@ -58,7 +58,7 @@ void HttpHandler::ProcessRequest(
|
||||
Dictionary::Ptr node = m_UrlTree;
|
||||
std::vector<HttpHandler::Ptr> handlers;
|
||||
|
||||
Url::Ptr url = new Url(request.target().to_string());
|
||||
Url::Ptr url = new Url(std::string(request.target()));
|
||||
auto& path (url->GetPath());
|
||||
|
||||
for (std::vector<String>::size_type i = 0; i <= path.size(); i++) {
|
||||
|
@ -246,7 +246,7 @@ bool HandleAccessControl(
|
||||
if (!allowedOrigins.empty()) {
|
||||
auto& origin (request[http::field::origin]);
|
||||
|
||||
if (allowedOrigins.find(origin.to_string()) != allowedOrigins.end()) {
|
||||
if (allowedOrigins.find(std::string(origin)) != allowedOrigins.end()) {
|
||||
response.set(http::field::access_control_allow_origin, origin);
|
||||
}
|
||||
|
||||
@ -536,7 +536,7 @@ void HttpServerConnection::ProcessMessages(boost::asio::yield_context yc)
|
||||
if (!authenticatedUser) {
|
||||
CpuBoundWork fetchingAuthenticatedUser (yc);
|
||||
|
||||
authenticatedUser = ApiUser::GetByAuthHeader(request[http::field::authorization].to_string());
|
||||
authenticatedUser = ApiUser::GetByAuthHeader(std::string(request[http::field::authorization]));
|
||||
}
|
||||
|
||||
Log logMsg (LogInformation, "HttpServerConnection");
|
||||
|
Loading…
x
Reference in New Issue
Block a user