set hostname in for CURLOPT_CURL to virtual hostname in case of SSL (for SNI to work)

This commit is contained in:
Andreas Baumann 2018-11-12 10:25:08 -05:00
parent 36fd675fbe
commit faea5899ba

View file

@ -368,7 +368,7 @@ check_http (void)
/* compose URL: use the address we want to connect to, set Host: header later */
snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s:%d%s",
use_ssl ? "https" : "http",
server_address,
use_ssl ? host_name : server_address,
server_port,
server_url
);