diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_curl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index c6593df1..7916eb55 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -688,9 +688,13 @@ check_http (void) | |||
688 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_MAXREDIRS, max_depth+1), "CURLOPT_MAXREDIRS"); | 688 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_MAXREDIRS, max_depth+1), "CURLOPT_MAXREDIRS"); |
689 | 689 | ||
690 | /* for now allow only http and https (we are a http(s) check plugin in the end) */ | 690 | /* for now allow only http and https (we are a http(s) check plugin in the end) */ |
691 | #if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 85, 0) | ||
692 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_REDIR_PROTOCOLS_STR, "http,https"), "CURLOPT_REDIR_PROTOCOLS_STR"); | ||
693 | #else | ||
691 | #if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 19, 4) | 694 | #if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 19, 4) |
692 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS), "CURLOPT_REDIRECT_PROTOCOLS"); | 695 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS), "CURLOPT_REDIRECT_PROTOCOLS"); |
693 | #endif /* LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 19, 4) */ | 696 | #endif /* LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 19, 4) */ |
697 | #endif /* LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 85, 4) */ | ||
694 | 698 | ||
695 | /* TODO: handle the following aspects of redirection, make them | 699 | /* TODO: handle the following aspects of redirection, make them |
696 | * command line options too later: | 700 | * command line options too later: |