[monitoring-plugins] fixed setting host_name or server_address in curl ...
Andreas Baumann <[email protected]> Thu, 27 Apr 2017 10:10:12 +0200 (CEST)
| Newsgroups | gmane.network.nagios.cvs |
|---|---|
| Message-ID | <20170427081012.34FDA200214B__48801.2718190022$1493282958$gmane$org@orwell.monitoring-plugins.org> |
Module: monitoring-plugins Branch: feature_check_curl Commit: 051754ef51343c67ba817fb21ac8b02603462558 Author: Andreas Baumann <[email protected]> Date: Thu Apr 27 10:04:47 2017 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=051754e fixed setting host_name or server_address in curl URL option --- plugins/check_curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/check_curl.c b/plugins/check_curl.c index e26d8d3..cd00b0e 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 */