diff --git a/src/http_client.c b/src/http_client.c index 7c0ac0836..fad3368f3 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -703,7 +703,7 @@ static int httpclient_init() httpclient_srv_ssl->uweight = 0; httpclient_srv_ssl->xprt = xprt_get(XPRT_SSL); httpclient_srv_ssl->use_ssl = 1; - httpclient_srv_ssl->id = strdup(""); + httpclient_srv_ssl->id = strdup(""); if (!httpclient_srv_ssl->id) goto err; @@ -713,6 +713,11 @@ static int httpclient_init() httpclient_proxy->next = proxies_list; proxies_list = httpclient_proxy; + /* link the 2 servers in the proxy */ + httpclient_srv_raw->next = httpclient_proxy->srv; + httpclient_srv_ssl->next = httpclient_srv_raw; + httpclient_proxy->srv = httpclient_srv_ssl; + return 0; err: