aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Andreas Baumann <mail@andreasbaumann.cc> 2017-04-27 10:04:47 +0200
committerGravatar Sven Nierlein <sven@nierlein.de> 2018-10-22 16:30:31 +0200
commitcfb7dace5405766785f31e8162c40d6bc3bc9c2a (patch)
tree3d8a72041421c93683e691422e7e0c5446cba032 /plugins
parentac08e9b2751a93dd65b5b66b59063f098ef2dc26 (diff)
downloadmonitoring-plugins-cfb7dace5405766785f31e8162c40d6bc3bc9c2a.tar.gz
fixed setting host_name or server_address in curl URL option
Diffstat (limited to 'plugins')
-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 e26d8d3f..cd00b0e3 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -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 */