Problem was that COMSTACK type was determined by vhost when
proxy was given. Proxy overrides host, except for the determination
of protocol (oid_proto).
(*connect_host)[len] = '\0';
uri = cp + 1;
}
- else
- {
- *connect_host = xstrdup(uri);
- uri += strlen(uri); /* set to "" */
- }
#ifdef WIN32
return 0;
#else
char *connect_host = 0;
if (!cs_parse_host(vhost, &host, &t, &proto, &connect_host))
+ {
+ xfree(connect_host);
return 0;
+ }
+
+ if (proxy_host)
+ {
+ enum oid_proto proto1;
+
+ xfree(connect_host);
+ if (!cs_parse_host(proxy_host, &host, &t, &proto1, &connect_host))
+ {
+ xfree(connect_host);
+ return 0;
+ }
+ }
if (t == tcpip_type)
{
}
if (cs)
{
- if (proxy_host)
- host = proxy_host;
if (!(*vp = cs_straddr(cs, connect_host ? connect_host : host)))
{
cs_close (cs);