[monitoring-plugins] changed URL construction again, IP should preceed ...
Andreas Baumann
git at monitoring-plugins.org
Fri Apr 28 08:40:11 CEST 2017
Module: monitoring-plugins
Branch: feature_check_curl
Commit: 067ef4269d209066f2fc71510c9ed952ceb26a1e
Author: Andreas Baumann <mail at andreasbaumann.cc>
Date: Fri Apr 28 08:39:13 2017 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=067ef42
changed URL construction again, IP should preceed hostname, hostname set as Host: (makes sure we get the corrent DNS entry and server)
---
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 babbcd5..de105fb 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -328,7 +328,7 @@ check_http (void)
/* compose URL */
snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s%s", use_ssl ? "https" : "http",
- host_name ? host_name : server_address, server_url);
+ server_address ? server_address : host_name, server_url);
handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, url), "CURLOPT_URL");
/* set port */
More information about the Commits
mailing list