Bump year
[metaproxy-moved-to-github.git] / src / filter_zoom.cpp
index 39021d1..d3bc5b1 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2012 Index Data
+   Copyright (C) 2005-2013 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -1420,19 +1420,15 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases(
         if (proxy.length())
             b->set_option("proxy", proxy);
     }
-    std::string url;
+    std::string url(sptr->target);
     if (sptr->sru.length())
     {
-        url = "http://" + sptr->target;
         b->set_option("sru", sptr->sru);
-
+        if (url.find("://") == std::string::npos)
+            url = "http://" + url;
         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;