X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fcomstack.c;h=40d7d4d76f995c299025207579ae53970e5a56a8;hb=80f8ae2b0879fb9bcc811fbbcb3a72bc8064ae7a;hp=db7ea2acf68d06356064f488af02de178adf88a1;hpb=a23ee5449742beee9dc2ebf56c70f065d6239df3;p=yaz-moved-to-github.git diff --git a/src/comstack.c b/src/comstack.c index db7ea2a..40d7d4d 100644 --- a/src/comstack.c +++ b/src/comstack.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: comstack.c,v 1.6 2004-02-25 12:59:56 adam Exp $ + * $Id: comstack.c,v 1.8 2004-04-29 08:55:17 adam Exp $ */ #include @@ -101,8 +101,8 @@ COMSTACK cs_create_host(const char *type_and_host, int blocking, void **vp) { t = tcpip_type; host = type_and_host + 5; - if (host[0] == '/' && host[1] == '/') - host = host + 2; + while (host[0] == '/') + host++; proto = PROTO_HTTP; } else if (strncmp(type_and_host, "https:", 6) == 0) @@ -110,8 +110,8 @@ COMSTACK cs_create_host(const char *type_and_host, int blocking, void **vp) #if HAVE_OPENSSL_SSL_H t = ssl_type; host = type_and_host + 6; - if (host[0] == '/' && host[1] == '/') - host = host + 2; + while (host[0] == '/') + host++; proto = PROTO_HTTP; #else return 0;