From 65f0af31276fe5d13aff79905a12245070d391fe Mon Sep 17 00:00:00 2001 From: Christian Spielberger Date: Fri, 23 Oct 2020 16:36:01 +0200 Subject: [PATCH] http request: the http_reqconn should not overwrite the host name Removes code lines that break parallel requests with one http_cli instance. --- src/http/request.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/http/request.c b/src/http/request.c index 3af72c61e..61d007c45 100644 --- a/src/http/request.c +++ b/src/http/request.c @@ -544,7 +544,6 @@ int http_reqconn_send(struct http_reqconn *conn, const struct pl *uri) char *host = NULL; #ifdef USE_TLS struct pl tlshn; - struct sa sa; #endif if (!conn || !pl_isset(uri)) @@ -569,10 +568,6 @@ int http_reqconn_send(struct http_reqconn *conn, const struct pl *uri) pl_set_str(&tlshn, conn->tlshn); err = http_client_set_tls_hostname(conn->client, &tlshn); } - else if (sa_set_str(&sa, host, 0) && ( - !pl_strcasecmp(&hu.scheme, "https") || - !pl_strcasecmp(&hu.scheme, "wss"))) - err = http_client_set_tls_hostname(conn->client, &hu.host); if (err) { DEBUG_WARNING("Could not set TLS hostname.\n");