In the IPv6-aware connect_to(), allocate http->host_ip_addr_str outside the loop...