From 9b62ebdae185de8fcae196750bd1e2ebabf0ed32 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Wed, 22 Jun 2022 19:28:34 +1000 Subject: [PATCH] Fix https only mode: It should not be http2 only Signed-off-by: Jiahao XU --- src/helpers.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/helpers.rs b/src/helpers.rs index 5ae9744f..6be1df71 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -51,9 +51,7 @@ pub fn new_reqwest_client_builder() -> ClientBuilder { let mut builder = ClientBuilder::new(); if let Some((https_only, min_tls_ver_opt)) = REQWESTGLOBALCONFIG.get() { - if *https_only { - builder = builder.http2_prior_knowledge(); - } + builder = builder.https_only(*https_only); if let Some(min_tls_ver) = *min_tls_ver_opt { builder = builder.min_tls_version(min_tls_ver.into());