projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformat
[metaproxy-moved-to-github.git]
/
src
/
filter_zoom.cpp
diff --git
a/src/filter_zoom.cpp
b/src/filter_zoom.cpp
index
018f532
..
2edddd5
100644
(file)
--- a/
src/filter_zoom.cpp
+++ b/
src/filter_zoom.cpp
@@
-60,6
+60,7
@@
namespace metaproxy_1 {
class Zoom::Searchable : boost::noncopyable {
public:
std::string authentication;
class Zoom::Searchable : boost::noncopyable {
public:
std::string authentication;
+ std::string authenticationMode;
std::string cfAuth;
std::string cfProxy;
std::string cfSubDB;
std::string cfAuth;
std::string cfProxy;
std::string cfSubDB;
@@
-508,6
+509,11
@@
yf::Zoom::SearchablePtr yf::Zoom::Impl::parse_torus_record(const xmlNode *ptr)
s->authentication = mp::xml::get_text(ptr);
}
else if (!strcmp((const char *) ptr->name,
s->authentication = mp::xml::get_text(ptr);
}
else if (!strcmp((const char *) ptr->name,
+ "authenticationMode"))
+ {
+ s->authenticationMode = mp::xml::get_text(ptr);
+ }
+ else if (!strcmp((const char *) ptr->name,
"cfAuth"))
{
s->cfAuth = mp::xml::get_text(ptr);
"cfAuth"))
{
s->cfAuth = mp::xml::get_text(ptr);
@@
-1345,8
+1351,7
@@
yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases(
if (sptr->query_encoding.length())
b->set_option("rpnCharset", sptr->query_encoding);
if (sptr->query_encoding.length())
b->set_option("rpnCharset", sptr->query_encoding);
- if (sptr->extraArgs.length())
- b->set_option("extraArgs", sptr->extraArgs);
+ std::string extraArgs = sptr->extraArgs;
b->set_option("timeout", m_p->zoom_timeout.c_str());
b->set_option("timeout", m_p->zoom_timeout.c_str());
@@
-1413,21
+1418,14
@@
yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases(
{
std::string user;
std::string password;
{
std::string user;
std::string password;
- std::string authtype;
+ std::string authtype = sptr->authenticationMode;
+
{
const char *cstr = authentication.c_str();
const char *cp1 = strchr(cstr, '/');
{
const char *cstr = authentication.c_str();
const char *cp1 = strchr(cstr, '/');
- const char *cp2 = 0;
if (cp1)
{
if (cp1)
{
- cp2 = strchr(cp1 + 1, '/');
- if (cp2)
- {
- password.assign(cp1 + 1, cp2 - cp1 - 1);
- authtype.assign(cp2 + 1);
- }
- else
- password.assign(cp1 + 1);
+ password.assign(cp1 + 1);
user.assign(cstr, cp1 - cstr);
}
else
user.assign(cstr, cp1 - cstr);
}
else
@@
-1450,7
+1448,9
@@
yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases(
values[2] = 0;
yaz_array_to_uri(&path, o, (char **) names, (char **) values);
values[2] = 0;
yaz_array_to_uri(&path, o, (char **) names, (char **) values);
- b->set_option("extraArgs", path);
+ if (extraArgs.length())
+ extraArgs.append("&");
+ extraArgs.append(path);
odr_destroy(o);
}
else
odr_destroy(o);
}
else
@@
-1463,6
+1463,9
@@
yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases(
if (proxy.length())
b->set_option("proxy", proxy);
}
if (proxy.length())
b->set_option("proxy", proxy);
}
+ if (extraArgs.length())
+ b->set_option("extraArgs", extraArgs);
+
std::string url(sptr->target);
if (sptr->sru.length())
{
std::string url(sptr->target);
if (sptr->sru.length())
{