From 43ff15cf860433aa15915b2ab4b62e23c9f3de95 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 22 Jul 2015 12:23:56 +0200 Subject: [PATCH] Fix problem with child nodes in http url registry fixes #9703 --- lib/remote/httphandler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/remote/httphandler.cpp b/lib/remote/httphandler.cpp index d785952ac..9716805d7 100644 --- a/lib/remote/httphandler.cpp +++ b/lib/remote/httphandler.cpp @@ -39,8 +39,11 @@ void HttpHandler::Register(const Url::Ptr& url, const HttpHandler::Ptr& handler) node->Set("children", children); } - Dictionary::Ptr sub_node = new Dictionary(); - children->Set(elem, sub_node); + Dictionary::Ptr sub_node = children->Get(elem); + if (!sub_node) { + sub_node = new Dictionary(); + children->Set(elem, sub_node); + } node = sub_node; } -- 2.40.0