From f873cbc2dd8b5c864eff275cc58c9b849134400a Mon Sep 17 00:00:00 2001 From: nilaoda Date: Wed, 12 Apr 2023 18:04:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE.Common/Util/HTTPUtil.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/N_m3u8DL-RE.Common/Util/HTTPUtil.cs b/src/N_m3u8DL-RE.Common/Util/HTTPUtil.cs index b48ad60..b26d452 100644 --- a/src/N_m3u8DL-RE.Common/Util/HTTPUtil.cs +++ b/src/N_m3u8DL-RE.Common/Util/HTTPUtil.cs @@ -11,12 +11,15 @@ namespace N_m3u8DL_RE.Common.Util { AllowAutoRedirect = false, AutomaticDecompression = DecompressionMethods.All, - ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true + ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true, + MaxConnectionsPerServer = 1024, }; public static readonly HttpClient AppHttpClient = new(HttpClientHandler) { - Timeout = TimeSpan.FromSeconds(100) + Timeout = TimeSpan.FromSeconds(100), + DefaultRequestVersion = HttpVersion.Version20, + DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher, }; private static async Task DoGetAsync(string url, Dictionary? headers = null)