projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27171cd
)
multi: empty route pattern uses route as default
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 8 Mar 2012 08:53:36 +0000
(09:53 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 8 Mar 2012 08:53:36 +0000
(09:53 +0100)
That is
<target route="z3950.indexdata.com">z3950.indexdata.com</route>
may use the shorter notation
<target route="z3950.indexdata.com"/>
src/filter_multi.cpp
patch
|
blob
|
history
diff --git
a/src/filter_multi.cpp
b/src/filter_multi.cpp
index
c49825b
..
c05070a
100644
(file)
--- a/
src/filter_multi.cpp
+++ b/
src/filter_multi.cpp
@@
-1295,6
+1295,8
@@
void mp::filter::Multi::configure(const xmlNode * ptr, bool test_only,
{
std::string route = mp::xml::get_route(ptr);
std::string target = mp::xml::get_text(ptr);
+ if (target.length() == 0)
+ target = route;
m_p->m_route_patterns.push_back(Multi::Map(target, route));
}
else if (!strcmp((const char *) ptr->name, "hideunavailable"))