summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-28 06:39:13 (GMT)
committerSven Nierlein <sven@nierlein.de>2018-10-22 14:30:31 (GMT)
commitefa7e2c1e7e90b83793cc63aa849c315f6d5d809 (patch)
tree1d7eb47361a1278e70bdec91e1dc7521ac719381
parent5d9104f07fd52ff3d23107fa9800c8b2a331987f (diff)
downloadmonitoring-plugins-efa7e2c1e7e90b83793cc63aa849c315f6d5d809.tar.gz
changed URL construction again, IP should preceed hostname, hostname set as Host: (makes sure we get the corrent DNS entry and server)
-rw-r--r--plugins/check_curl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index babbcd5..de105fb 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -328,7 +328,7 @@ check_http (void)
328 328
329 /* compose URL */ 329 /* compose URL */
330 snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s%s", use_ssl ? "https" : "http", 330 snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s%s", use_ssl ? "https" : "http",
331 host_name ? host_name : server_address, server_url); 331 server_address ? server_address : host_name, server_url);
332 handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, url), "CURLOPT_URL"); 332 handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, url), "CURLOPT_URL");
333 333
334 /* set port */ 334 /* set port */