diff options
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r-- | plugins/check_curl.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 8ea73ce1..748201e8 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -818,8 +818,11 @@ int check_http(void) { | |||
818 | 818 | ||
819 | /* cookie handling */ | 819 | /* cookie handling */ |
820 | if (cookie_jar_file != NULL) { | 820 | if (cookie_jar_file != NULL) { |
821 | handle_curl_option_return_code(curl_easy_setopt(curl, CURLOPT_COOKIEJAR, cookie_jar_file), "CURLOPT_COOKIEJAR"); | 821 | /* enable reading cookies from a file, and if the filename is an empty string, only enable the curl cookie engine */ |
822 | handle_curl_option_return_code(curl_easy_setopt(curl, CURLOPT_COOKIEFILE, cookie_jar_file), "CURLOPT_COOKIEFILE"); | 822 | handle_curl_option_return_code(curl_easy_setopt(curl, CURLOPT_COOKIEFILE, cookie_jar_file), "CURLOPT_COOKIEFILE"); |
823 | /* now enable saving cookies to a file, but only if the filename is not an empty string, since writing it would fail */ | ||
824 | if (*cookie_jar_file) | ||
825 | handle_curl_option_return_code(curl_easy_setopt(curl, CURLOPT_COOKIEJAR, cookie_jar_file), "CURLOPT_COOKIEJAR"); | ||
823 | } | 826 | } |
824 | 827 | ||
825 | /* do the request */ | 828 | /* do the request */ |
@@ -1912,7 +1915,7 @@ void print_help(void) { | |||
1912 | printf(" %s\n", _("Connect via SSL. Port defaults to 443. VERSION is optional, and prevents")); | 1915 | printf(" %s\n", _("Connect via SSL. Port defaults to 443. VERSION is optional, and prevents")); |
1913 | printf(" %s\n", _("auto-negotiation (2 = SSLv2, 3 = SSLv3, 1 = TLSv1, 1.1 = TLSv1.1,")); | 1916 | printf(" %s\n", _("auto-negotiation (2 = SSLv2, 3 = SSLv3, 1 = TLSv1, 1.1 = TLSv1.1,")); |
1914 | printf(" %s\n", _("1.2 = TLSv1.2, 1.3 = TLSv1.3). With a '+' suffix, newer versions are also accepted.")); | 1917 | printf(" %s\n", _("1.2 = TLSv1.2, 1.3 = TLSv1.3). With a '+' suffix, newer versions are also accepted.")); |
1915 | printf(" %s\n", _("Note: SSLv2 and SSLv3 are deprecated and are usually disabled in libcurl")); | 1918 | printf(" %s\n", _("Note: SSLv2, SSLv3, TLSv1.0 and TLSv1.1 are deprecated and are usually disabled in libcurl")); |
1916 | printf(" %s\n", "--sni"); | 1919 | printf(" %s\n", "--sni"); |
1917 | printf(" %s\n", _("Enable SSL/TLS hostname extension support (SNI)")); | 1920 | printf(" %s\n", _("Enable SSL/TLS hostname extension support (SNI)")); |
1918 | # if LIBCURL_VERSION_NUM >= 0x071801 | 1921 | # if LIBCURL_VERSION_NUM >= 0x071801 |
@@ -2011,6 +2014,9 @@ void print_help(void) { | |||
2011 | printf(" %s\n", _("Send HAProxy proxy protocol v1 header (CURLOPT_HAPROXYPROTOCOL).")); | 2014 | printf(" %s\n", _("Send HAProxy proxy protocol v1 header (CURLOPT_HAPROXYPROTOCOL).")); |
2012 | printf(" %s\n", "--cookie-jar=FILE"); | 2015 | printf(" %s\n", "--cookie-jar=FILE"); |
2013 | printf(" %s\n", _("Store cookies in the cookie jar and send them out when requested.")); | 2016 | printf(" %s\n", _("Store cookies in the cookie jar and send them out when requested.")); |
2017 | printf(" %s\n", _("Specify an empty string as FILE to enable curl's cookie engine without saving")); | ||
2018 | printf(" %s\n", _("the cookies to disk. Only enabling the engine without saving to disk requires")); | ||
2019 | printf(" %s\n", _("handling multiple requests internally to curl, so use it with --onredirect=curl")); | ||
2014 | printf("\n"); | 2020 | printf("\n"); |
2015 | 2021 | ||
2016 | printf(UT_WARN_CRIT); | 2022 | printf(UT_WARN_CRIT); |