aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Andreas Baumann <mail@andreasbaumann.cc> 2018-11-12 10:25:08 -0500
committerGravatar Andreas Baumann <mail@andreasbaumann.cc> 2018-11-12 10:25:08 -0500
commitfaea5899ba3264581bf75649e4b399d0b69bd125 (patch)
tree07ab722a438dcbd174853d4dcf13e4c8762d8218
parent36fd675fbe02f2492c4adbb001da38856f96c2f2 (diff)
downloadmonitoring-plugins-faea5899ba3264581bf75649e4b399d0b69bd125.tar.gz
set hostname in for CURLOPT_CURL to virtual hostname in case of SSL (for SNI to work)
-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 58f454b8..637e9ba3 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
);