summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-28 08:39:13 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-04-28 08:39:13 +0200
commit067ef4269d209066f2fc71510c9ed952ceb26a1e (patch)
tree17e5c3974a78b1e5e5a60c19c64eb90567583606
parent4df31dbe62b873a94282723463f8a5588bb3dfb9 (diff)
downloadmonitoring-plugins-067ef4269d209066f2fc71510c9ed952ceb26a1e.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 babbcd5e..de105fbe 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 */