fixed setting host_name or server_address in curl URL option

This commit is contained in:
Andreas Baumann 2017-04-27 10:04:47 +02:00 committed by Sven Nierlein
parent ac08e9b275
commit cfb7dace54

View file

@ -325,7 +325,7 @@ check_http (void)
/* compose URL */
snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s%s", use_ssl ? "https" : "http",
host_name, server_url);
host_name ? host_name : server_address, server_url);
handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, url), "CURLOPT_URL");
/* set port */