* 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.10 2004-05-03 09:00:50 adam Exp $
*/
#include <string.h>
{
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)
#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;
{
t = tcpip_type;
host = type_and_host;
-
}
cs = cs_create (t, blocking, proto);
if (!cs)
break;
}
else if (i < len - 20 &&
- !strncasecmp(buf+i, "Transfer-Encoding:", 18))
+ !strncasecmp((const char *) buf+i, "Transfer-Encoding:", 18))
{
i+=18;
while (buf[i] == ' ')
i++;
if (i < len - 8)
- if (!strncasecmp(buf+i, "chunked", 7))
+ if (!strncasecmp((const char *) buf+i, "chunked", 7))
chunked = 1;
}
else if (i < len - 17 &&
- !strncasecmp(buf+i, "Content-Length:", 15))
+ !strncasecmp((const char *)buf+i, "Content-Length:", 15))
{
i+= 15;
while (buf[i] == ' ')