const char *host, int portnum)
{
const char *val;
- const char *http_lead;
initlog();
else
c->lang = 0;
- val = ZOOM_options_get(c->options, "sru");
- if (val && *val && !strstr(host, "://"))
- http_lead = "http://";
- else
- http_lead = "";
- c->sru_mode = get_sru_mode_from_string(val);
-
if (host)
{
char hostn[128];
+ const char *http_lead;
+
+ val = ZOOM_options_get(c->options, "sru");
+ if (val && *val && !strstr(host, "://"))
+ http_lead = "http://";
+ else
+ http_lead = "";
+ c->sru_mode = get_sru_mode_from_string(val);
+
xfree(c->host_port);
if (portnum)
{
if (c->cs)
cs_close(c->cs);
- c->cs = cs_create_host_proxy(logical_url, 0, &add,
+ c->cs = cs_create_host_proxy(logical_url, CS_FLAGS_DNS_NO_BLOCK, &add,
c->tproxy ? c->tproxy : c->proxy);
if (c->cs && c->cs->protocol == PROTO_HTTP)
location, &host_change);
if (do_connect_host(c, location) == zoom_complete)
return; /* connect failed.. */
+ cs_rcvconnect(c->cs);
send_HTTP_redirect(c, location);
return;
}
if (c->cs->io_pending & CS_WANT_READ)
mask += ZOOM_SELECT_READ;
ZOOM_connection_set_mask(c, mask);
- event = ZOOM_Event_create(ZOOM_EVENT_NONE);
+ event = ZOOM_Event_create(ZOOM_EVENT_CONNECT);
ZOOM_connection_put_event(c, event);
}
else if (ret == 0)