Only add http:// for SRU if not already there
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 28 Dec 2012 14:11:42 +0000 (15:11 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 28 Dec 2012 14:11:42 +0000 (15:11 +0100)
This is to allow https or other method to be given. Similar to
MP-425.

src/connection.c

index d3eaeef..c1ff7d5 100644 (file)
@@ -463,12 +463,11 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man)
         return -1;
     }
 
-    if (sru && *sru)
+    if (sru && *sru && !strstr(host->url, "://"))
     {
         char http_hostport[512];
         strcpy(http_hostport, "http://");
         strcat(http_hostport, host->url);
-        yaz_log(YLOG_LOG, "SRU connect to : %s", http_hostport);
         ZOOM_connection_connect(con->link, http_hostport, 0);
     }
     else