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:
691b79d
)
zoom: only append http:// for SRU if not already given
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 14 Nov 2012 11:35:20 +0000
(12:35 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 14 Nov 2012 11:35:20 +0000
(12:35 +0100)
src/filter_zoom.cpp
patch
|
blob
|
history
diff --git
a/src/filter_zoom.cpp
b/src/filter_zoom.cpp
index
39021d1
..
0905765
100644
(file)
--- a/
src/filter_zoom.cpp
+++ b/
src/filter_zoom.cpp
@@
-1420,19
+1420,16
@@
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);
}
- std::string url;
+ std::string url(sptr->target);
if (sptr->sru.length())
{
if (sptr->sru.length())
{
- url = "http://" + sptr->target;
+ yaz_log(YLOG_LOG, "Got URL %s", url.c_str());
b->set_option("sru", sptr->sru);
b->set_option("sru", sptr->sru);
-
+ if (url.find_first_of("://") == std::string::npos)
+ url = "http://" + url;
if (sptr->sru_version.length())
b->set_option("sru_version", sptr->sru_version);
}
if (sptr->sru_version.length())
b->set_option("sru_version", sptr->sru_version);
}
- else
- {
- url = sptr->target;
- }
if (no_out_args)
{
char *x_args = 0;
if (no_out_args)
{
char *x_args = 0;