summaryrefslogtreecommitdiff
path: root/content/fetchers/curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/fetchers/curl.c')
-rw-r--r--content/fetchers/curl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 7d0e40c..c8e4caf 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -569,6 +569,11 @@ static CURLcode fetch_curl_set_options(struct curl_fetch_info *f)
return code; \
}
+#if LIBCURL_VERSION_NUM >= 0x072f00
+ /* Added in 7.47 */
+ /* Prefer HTTP/2 on encrypted connections */
+ SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
+#endif
SETOPT(CURLOPT_URL, nsurl_access(f->url));
SETOPT(CURLOPT_PRIVATE, f);
SETOPT(CURLOPT_WRITEDATA, f);
@@ -1457,6 +1462,13 @@ nserror fetch_curl_register(void)
SETOPT(CURLMOPT_MAXCONNECTS, maxconnects);
SETOPT(CURLMOPT_MAX_TOTAL_CONNECTIONS, maxconnects);
SETOPT(CURLMOPT_MAX_HOST_CONNECTIONS, nsoption_int(max_fetchers_per_host));
+
+#if LIBCURL_VERSION_NUM >= 0x072b00
+ /* Added in 7.43.0 */
+ /* Use HTTP/2 multiplexing */
+ SETOPT(CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+#endif
+
}
#endif