diff options
Diffstat (limited to 'mod/mod-repository-root.cxx')
-rw-r--r-- | mod/mod-repository-root.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mod/mod-repository-root.cxx b/mod/mod-repository-root.cxx index 3b0ab1f..b8777fd 100644 --- a/mod/mod-repository-root.cxx +++ b/mod/mod-repository-root.cxx @@ -275,13 +275,27 @@ namespace brep if (!rpath.sub (root)) return false; - const path& lpath (rpath.leaf (root)); + path lpath (rpath.leaf (root)); + + if (!lpath.empty ()) + { + path::iterator i (lpath.begin ()); + const string& s (*i); + + if (s[0] == '@' && s.size () > 1) + { + tenant = string (s, 1); + lpath = path (++i, lpath.end ()); + } + } // Delegate the request handling to the selected sub-handler. Intercept // exception handling to add sub-handler attribution. // - auto handle = [&rq, &rs, this] (const char* nm, bool fn = false) -> bool + auto handle = [&rq, &rs, this] (const char* nm, bool fn = false) { + handler_->tenant = move (tenant); + try { // Delegate the handling straight away if the sub-handler is not a |