Skip to content

Commit

Permalink
http request: the http_reqconn should not overwrite the host name
Browse files Browse the repository at this point in the history
Removes code lines that break parallel requests with one http_cli instance.
  • Loading branch information
cspiel1 committed Oct 23, 2020
1 parent a18c78e commit 65f0af3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/http/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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");
Expand Down

0 comments on commit 65f0af3

Please sign in to comment.