mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +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
5bcbc96e22
commit
99c2d69dc8
@ -58,7 +58,7 @@ void HttpHandler::ProcessRequest(
|
|||||||
Dictionary::Ptr node = m_UrlTree;
|
Dictionary::Ptr node = m_UrlTree;
|
||||||
std::vector<HttpHandler::Ptr> handlers;
|
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());
|
auto& path (url->GetPath());
|
||||||
|
|
||||||
for (std::vector<String>::size_type i = 0; i <= path.size(); i++) {
|
for (std::vector<String>::size_type i = 0; i <= path.size(); i++) {
|
||||||
|
@ -246,7 +246,7 @@ bool HandleAccessControl(
|
|||||||
if (!allowedOrigins.empty()) {
|
if (!allowedOrigins.empty()) {
|
||||||
auto& origin (request[http::field::origin]);
|
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);
|
response.set(http::field::access_control_allow_origin, origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,7 +536,7 @@ void HttpServerConnection::ProcessMessages(boost::asio::yield_context yc)
|
|||||||
if (!authenticatedUser) {
|
if (!authenticatedUser) {
|
||||||
CpuBoundWork fetchingAuthenticatedUser (yc);
|
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");
|
Log logMsg (LogInformation, "HttpServerConnection");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user