about summary refs log tree commit diff
path: root/src/core/nm-connectivity.c
diff options
context:
space:
mode:
authorJeremy Bicha <jeremy.bicha@canonical.com>2023-01-26 16:56:49 -0500
committerJeremy Bicha <jeremy.bicha@canonical.com>2023-01-26 16:56:49 -0500
commitb37cf412cae342684b4ab3709a1b8aaef728cada (patch)
tree7601e9fc1c7f7c9c66178b8ab22c768342676198 /src/core/nm-connectivity.c
parent4b928cbbf5f92da2ee2f9fce687310f2a95d9c43 (diff)
parent2c1b7a7ea3c332b4d690c0595ef76c81de1f0cc8 (diff)
Merge tag 'debian/1.40.12-1' into ubuntu/master
network-manager Debian release 1.40.12-1
Diffstat (limited to 'src/core/nm-connectivity.c')
-rw-r--r--src/core/nm-connectivity.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c
index cd30853d..c0e77e35 100644
--- a/src/core/nm-connectivity.c
+++ b/src/core/nm-connectivity.c
@@ -767,7 +767,13 @@ do_curl_request(NMConnectivityCheckHandle *cb_data, const char *hosts)
     curl_easy_setopt(ehandle, CURLOPT_INTERFACE, cb_data->ifspec);
     curl_easy_setopt(ehandle, CURLOPT_RESOLVE, cb_data->concheck.hosts);
     curl_easy_setopt(ehandle, CURLOPT_IPRESOLVE, resolve);
+
+#if LIBCURL_VERSION_NUM >= 0x075500 /* libcurl 7.85.0 */
+    curl_easy_setopt(ehandle, CURLOPT_PROTOCOLS_STR, "HTTP,HTTPS");
+#else
     curl_easy_setopt(ehandle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
+#endif
+
     if (_LOGT_ENABLED() && easy_debug_enabled()) {
         curl_easy_setopt(ehandle, CURLOPT_DEBUGFUNCTION, easy_debug_cb);
         curl_easy_setopt(ehandle, CURLOPT_DEBUGDATA, cb_data);