mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
parent
d7d16d3f36
commit
73b72544ee
@ -62,8 +62,9 @@ void HttpHandler::ProcessRequest(const ApiUser::Ptr& user, HttpRequest& request,
|
|||||||
{
|
{
|
||||||
Dictionary::Ptr node = m_UrlTree;
|
Dictionary::Ptr node = m_UrlTree;
|
||||||
std::vector<HttpHandler::Ptr> handlers;
|
std::vector<HttpHandler::Ptr> handlers;
|
||||||
|
const std::vector<String>& path = request.RequestUrl->GetPath();
|
||||||
|
|
||||||
BOOST_FOREACH(const String& elem, request.RequestUrl->GetPath()) {
|
for (int i = 0; i <= path.size(); i++) {
|
||||||
Array::Ptr current_handlers = node->Get("handlers");
|
Array::Ptr current_handlers = node->Get("handlers");
|
||||||
|
|
||||||
if (current_handlers) {
|
if (current_handlers) {
|
||||||
@ -80,7 +81,10 @@ void HttpHandler::ProcessRequest(const ApiUser::Ptr& user, HttpRequest& request,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
node = children->Get(elem);
|
if (i == path.size())
|
||||||
|
break;
|
||||||
|
|
||||||
|
node = children->Get(path[i]);
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user