From 40ec077ea305994c1fc2130add6787ca0c73e2c6 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 26 Jan 2023 21:18:45 +0100 Subject: New upstream version 1.40.12 --- src/nm-cloud-setup/nm-http-client.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nm-cloud-setup') diff --git a/src/nm-cloud-setup/nm-http-client.c b/src/nm-cloud-setup/nm-http-client.c index a0053d47..a0964e21 100644 --- a/src/nm-cloud-setup/nm-http-client.c +++ b/src/nm-cloud-setup/nm-http-client.c @@ -305,7 +305,12 @@ nm_http_client_get(NMHttpClient *self, curl_easy_setopt(edata->ehandle, CURLOPT_WRITEFUNCTION, _get_writefunction_cb); curl_easy_setopt(edata->ehandle, CURLOPT_WRITEDATA, edata); curl_easy_setopt(edata->ehandle, CURLOPT_PRIVATE, edata); + +#if LIBCURL_VERSION_NUM >= 0x075500 /* libcurl 7.85.0 */ + curl_easy_setopt(edata->ehandle, CURLOPT_PROTOCOLS_STR, "HTTP,HTTPS"); +#else curl_easy_setopt(edata->ehandle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); +#endif if (http_headers) { for (i = 0; http_headers[i]; ++i) { -- cgit 1.3.0-6-gf8a5