summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/check_curl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 7f1f64c..9dea9c4 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -1503,8 +1503,12 @@ process_arguments (int argc, char **argv)
1503 curl_http_version = CURL_HTTP_VERSION_1_0; 1503 curl_http_version = CURL_HTTP_VERSION_1_0;
1504 } else if (strcmp (optarg, "1.1") == 0) { 1504 } else if (strcmp (optarg, "1.1") == 0) {
1505 curl_http_version = CURL_HTTP_VERSION_1_1; 1505 curl_http_version = CURL_HTTP_VERSION_1_1;
1506 } else if (strcmp (optarg, "2") == 0) { 1506 } else if ((strcmp (optarg, "2.0") == 0) || (strcmp (optarg, "2") == 0)) {
1507#if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 33, 0)
1507 curl_http_version = CURL_HTTP_VERSION_2_0; 1508 curl_http_version = CURL_HTTP_VERSION_2_0;
1509#else
1510 curl_http_version = CURL_HTTP_VERSION_NONE;
1511#endif /* LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 33, 0) */
1508 } else { 1512 } else {
1509 fprintf (stderr, "unkown http-version parameter: %s\n", optarg); 1513 fprintf (stderr, "unkown http-version parameter: %s\n", optarg);
1510 exit (STATE_WARNING); 1514 exit (STATE_WARNING);