diff options
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r-- | plugins/check_curl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 9dea9c4..69b6344 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -387,6 +387,11 @@ check_http (void) | |||
387 | http_method = "GET"; | 387 | http_method = "GET"; |
388 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, server_url), "CURLOPT_URL"); | 388 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, server_url), "CURLOPT_URL"); |
389 | } | 389 | } |
390 | |||
391 | /* disable body for HEAD request */ | ||
392 | if (http_method && !strcmp (http_method, "HEAD" )) { | ||
393 | no_body = TRUE; | ||
394 | } | ||
390 | 395 | ||
391 | /* set HTTP protocol version */ | 396 | /* set HTTP protocol version */ |
392 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_HTTP_VERSION, curl_http_version), "CURLOPT_HTTP_VERSION"); | 397 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_HTTP_VERSION, curl_http_version), "CURLOPT_HTTP_VERSION"); |
@@ -627,7 +632,7 @@ check_http (void) | |||
627 | server_port, res, curl_easy_strerror(res)); | 632 | server_port, res, curl_easy_strerror(res)); |
628 | die (STATE_CRITICAL, "HTTP CRITICAL - %s\n", msg); | 633 | die (STATE_CRITICAL, "HTTP CRITICAL - %s\n", msg); |
629 | } | 634 | } |
630 | 635 | ||
631 | /* certificate checks */ | 636 | /* certificate checks */ |
632 | #ifdef LIBCURL_FEATURE_SSL | 637 | #ifdef LIBCURL_FEATURE_SSL |
633 | if (use_ssl == TRUE) { | 638 | if (use_ssl == TRUE) { |