🔒 Repository is read-only – file editing is disabled.
123456789101112131415
--- a/common/flatpak-utils-http.c 2022-08-23 05:15:25.000000000 +0200
+++ b/common/flatpak-utils-http.c 2022-09-06 13:32:55.677624779 +0200
@@ -388,8 +388,10 @@
* libcurl 7.43.0.
*/
#if CURL_AT_LEAST_VERSION(7, 51, 0)
- rc = curl_easy_setopt (curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
- g_assert_cmpint (rc, ==, CURLM_OK);
+ if ((curl_version_info (CURLVERSION_NOW))->features & CURL_VERSION_HTTP2) {
+ rc = curl_easy_setopt (curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ }
#endif
/* https://github.com/curl/curl/blob/curl-7_53_0/docs/examples/http2-download.c */
#if (CURLPIPE_MULTIPLEX > 0)