From: Adam Dickmeiss Date: Thu, 29 Apr 2004 08:55:17 +0000 (+0000) Subject: Relax http/https URL check a bit X-Git-Tag: YAZ.2.0.20~24 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=80f8ae2b0879fb9bcc811fbbcb3a72bc8064ae7a;p=yaz-moved-to-github.git Relax http/https URL check a bit --- diff --git a/src/comstack.c b/src/comstack.c index 7ee51fe..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.7 2004-04-28 22:44:59 adam Exp $ + * $Id: comstack.c,v 1.8 2004-04-29 08:55:17 adam Exp $ */ #include @@ -74,13 +74,6 @@ COMSTACK cs_create_host(const char *type_and_host, int blocking, void **vp) COMSTACK cs; CS_TYPE t; - printf ( -#if HAVE_OPENSSL_SSL_H - "cs_create_host SSL\n" -#else - "cs_create_host\n" -#endif - ); if (strncmp (type_and_host, "tcp:", 4) == 0) { t = tcpip_type; @@ -108,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) @@ -117,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; diff --git a/src/tcpip.c b/src/tcpip.c index 5f46f3e..8dacfe5 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: tcpip.c,v 1.3 2004-04-28 22:44:59 adam Exp $ + * $Id: tcpip.c,v 1.4 2004-04-29 08:55:17 adam Exp $ */ #include @@ -196,7 +196,6 @@ COMSTACK ssl_type(int s, int blocking, int protocol, void *vp) { tcpip_state *state; COMSTACK p; - yaz_log(LOG_LOG, "ssl_type begin"); p = tcpip_type (s, blocking, protocol, 0); if (!p) @@ -220,7 +219,6 @@ COMSTACK ssl_type(int s, int blocking, int protocol, void *vp) } } /* note: we don't handle already opened socket in SSL mode - yet */ - yaz_log(LOG_LOG, "ssl_type end"); return p; } #endif