[monitoring-plugins] set hostname in for CURLOPT_CURL to virtual ...
Andreas Baumann <[email protected]> Mon, 12 Nov 2018 16:30:20 +0100 (CET)
| Newsgroups | gmane.network.nagios.cvs |
|---|---|
| Message-ID | <20181112153020.65B97200850B__27560.11746028$1542036494$gmane$org@orwell.monitoring-plugins.org> |
Module: monitoring-plugins Branch: feature_check_curl Commit: faea5899ba3264581bf75649e4b399d0b69bd125 Author: Andreas Baumann <[email protected]> Date: Mon Nov 12 10:25:08 2018 -0500 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=faea589 set hostname in for CURLOPT_CURL to virtual hostname in case of SSL (for SNI to work) --- 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 58f454b..637e9ba 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c @@ -368,7 +368,7 @@ check_http (void) /* compose URL: use the address we want to connect to, set Host: header later */ snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s:%d%s", use_ssl ? "https" : "http", - server_address, + use_ssl ? host_name : server_address, server_port, server_url );