Fix URL handlers

refs #9768
This commit is contained in:
Gunnar Beutner 2015-08-11 09:31:28 +02:00
parent d7d16d3f36
commit 73b72544ee
1 changed files with 6 additions and 2 deletions

View File

@ -62,8 +62,9 @@ void HttpHandler::ProcessRequest(const ApiUser::Ptr& user, HttpRequest& request,
{
Dictionary::Ptr node = m_UrlTree;
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");
if (current_handlers) {
@ -80,7 +81,10 @@ void HttpHandler::ProcessRequest(const ApiUser::Ptr& user, HttpRequest& request,
break;
}
node = children->Get(elem);
if (i == path.size())
break;
node = children->Get(path[i]);
if (!node)
break;