about summary refs log tree commit diff
path: root/src/nm-cloud-setup/nm-http-client.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2023-01-26 21:57:17 +0100
committerMichael Biebl <biebl@debian.org>2023-01-26 21:57:17 +0100
commitf8b5aa96b4370d88f38699433cec6e7a26a410f1 (patch)
tree1817c96b86eac7fb93125a52d6b6d31f6a4bad45 /src/nm-cloud-setup/nm-http-client.c
parentb0529444cb9c40efb19c7b4d4fe8da86ebcc7bdb (diff)
parent2c1b7a7ea3c332b4d690c0595ef76c81de1f0cc8 (diff)
Merge tag 'debian/1.40.12-1' into debian/bullseye-backports
network-manager Debian release 1.40.12-1
Diffstat (limited to 'src/nm-cloud-setup/nm-http-client.c')
-rw-r--r--src/nm-cloud-setup/nm-http-client.c5
1 files changed, 5 insertions, 0 deletions
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) {