From cfb7dace5405766785f31e8162c40d6bc3bc9c2a Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 27 Apr 2017 10:04:47 +0200 Subject: fixed setting host_name or server_address in curl URL option 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 */ -- cgit v0.10-9-g596f