diff options
-rw-r--r-- | plugins/check_curl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 7aae920..947144a 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -392,7 +392,7 @@ check_http (void) | |||
392 | if (http_method && !strcmp (http_method, "HEAD" )) { | 392 | if (http_method && !strcmp (http_method, "HEAD" )) { |
393 | no_body = TRUE; | 393 | no_body = TRUE; |
394 | } | 394 | } |
395 | 395 | ||
396 | /* set HTTP protocol version */ | 396 | /* set HTTP protocol version */ |
397 | 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"); |
398 | 398 | ||
@@ -632,7 +632,7 @@ check_http (void) | |||
632 | server_port, res, curl_easy_strerror(res)); | 632 | server_port, res, curl_easy_strerror(res)); |
633 | die (STATE_CRITICAL, "HTTP CRITICAL - %s\n", msg); | 633 | die (STATE_CRITICAL, "HTTP CRITICAL - %s\n", msg); |
634 | } | 634 | } |
635 | 635 | ||
636 | /* certificate checks */ | 636 | /* certificate checks */ |
637 | #ifdef LIBCURL_FEATURE_SSL | 637 | #ifdef LIBCURL_FEATURE_SSL |
638 | if (use_ssl == TRUE) { | 638 | if (use_ssl == TRUE) { |
@@ -1504,7 +1504,7 @@ process_arguments (int argc, char **argv) | |||
1504 | break; | 1504 | break; |
1505 | case HTTP_VERSION_OPTION: | 1505 | case HTTP_VERSION_OPTION: |
1506 | curl_http_version = CURL_HTTP_VERSION_NONE; | 1506 | curl_http_version = CURL_HTTP_VERSION_NONE; |
1507 | if (strcmp (optarg, "1.0") == 0) { | 1507 | if (strcmp (optarg, "1.0") == 0) { |
1508 | curl_http_version = CURL_HTTP_VERSION_1_0; | 1508 | curl_http_version = CURL_HTTP_VERSION_1_0; |
1509 | } else if (strcmp (optarg, "1.1") == 0) { | 1509 | } else if (strcmp (optarg, "1.1") == 0) { |
1510 | curl_http_version = CURL_HTTP_VERSION_1_1; | 1510 | curl_http_version = CURL_HTTP_VERSION_1_1; |
@@ -1724,7 +1724,7 @@ print_help (void) | |||
1724 | printf ("\n"); | 1724 | printf ("\n"); |
1725 | printf (" %s\n", "--http-version=VERSION"); | 1725 | printf (" %s\n", "--http-version=VERSION"); |
1726 | printf (" %s\n", _("Connect via specific HTTP protocol.")); | 1726 | printf (" %s\n", _("Connect via specific HTTP protocol.")); |
1727 | printf (" %s\n", _("1.0 = HTTP/1.0, 1.1 = HTTP/1.1, 2.0 = HTTP/2 (HTTP/2 will fail without -S)")); | 1727 | printf (" %s\n", _("1.0 = HTTP/1.0, 1.1 = HTTP/1.1, 2.0 = HTTP/2 (HTTP/2 will fail without -S)")); |
1728 | printf ("\n"); | 1728 | printf ("\n"); |
1729 | 1729 | ||
1730 | printf (UT_WARN_CRIT); | 1730 | printf (UT_WARN_CRIT); |
@@ -1809,7 +1809,7 @@ print_usage (void) | |||
1809 | printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n"); | 1809 | printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n"); |
1810 | printf (" [-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]\n"); | 1810 | printf (" [-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]\n"); |
1811 | printf (" [-T <content-type>] [-j method]\n"); | 1811 | printf (" [-T <content-type>] [-j method]\n"); |
1812 | printf (" [--http-version=<version>]\n"); | 1812 | printf (" [--http-version=<version>]\n"); |
1813 | printf ("\n"); | 1813 | printf ("\n"); |
1814 | printf ("%s\n", _("WARNING: check_curl is experimental. Please use")); | 1814 | printf ("%s\n", _("WARNING: check_curl is experimental. Please use")); |
1815 | printf ("%s\n\n", _("check_http if you need a stable version.")); | 1815 | printf ("%s\n\n", _("check_http if you need a stable version.")); |
@@ -1958,7 +1958,7 @@ curlhelp_parse_statusline (const char *buf, curlhelp_statusline *status_line) | |||
1958 | p = strtok( NULL, " " ); | 1958 | p = strtok( NULL, " " ); |
1959 | if( p == NULL ) { free( first_line_buf ); return -1; } | 1959 | if( p == NULL ) { free( first_line_buf ); return -1; } |
1960 | if( strchr( p, '.' ) != NULL ) { | 1960 | if( strchr( p, '.' ) != NULL ) { |
1961 | 1961 | ||
1962 | /* HTTP 1.x case */ | 1962 | /* HTTP 1.x case */ |
1963 | char *ppp; | 1963 | char *ppp; |
1964 | ppp = strtok( p, "." ); | 1964 | ppp = strtok( p, "." ); |
@@ -2219,7 +2219,7 @@ net_noopenssl_check_certificate (cert_ptr_union* cert_ptr, int days_till_exp_war | |||
2219 | 2219 | ||
2220 | for (i = 0; i < cert_ptr->to_certinfo->num_of_certs; i++) { | 2220 | for (i = 0; i < cert_ptr->to_certinfo->num_of_certs; i++) { |
2221 | for (slist = cert_ptr->to_certinfo->certinfo[i]; slist; slist = slist->next) { | 2221 | for (slist = cert_ptr->to_certinfo->certinfo[i]; slist; slist = slist->next) { |
2222 | /* find first common name in subject, | 2222 | /* find first common name in subject, |
2223 | * TODO: check alternative subjects for | 2223 | * TODO: check alternative subjects for |
2224 | * TODO: have a decent parser here and not a hack | 2224 | * TODO: have a decent parser here and not a hack |
2225 | * multi-host certificate, check wildcards | 2225 | * multi-host certificate, check wildcards |