From 1f2e2c969bfdc5bc5bad2abed23dfbded1d720a3 Mon Sep 17 00:00:00 2001 From: xingyunjohn1 <32031270+xingyunjohn1@users.noreply.github.com> Date: Thu, 14 Jul 2022 04:15:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=98=BB=E6=AD=A2Accept-Encoding=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E9=87=8D=E5=A4=8D=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实践中发现存在该字段重复设置的可能。该字段在L162赋初值,在L189可能重复。表现为: (testing case)[https://prd-vcache.edge-global.akamai.tvb.com/v11/newsbksdrm/_definst_/smil:news/inews1/20220713/archive_26_697473_1280_720_1500k_cht_proenv_can.smil/manifest.mpd?hdnea=ip=0.0.0.0~st=1657739530~exp=1657825930~acl=/v11/newsbksdrm/_definst_/smil:news/inews1/20220713/archive_26_697473_1280_720_1500k_cht_proenv_can.smil/*~hmac=5439856aadc2f65865ea69c649e10c20db948239ad94ed5b2696578f6aa9d15d] --- N_m3u8DL-CLI/Global.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/N_m3u8DL-CLI/Global.cs b/N_m3u8DL-CLI/Global.cs index cb3b2d4..24a6ad7 100644 --- a/N_m3u8DL-CLI/Global.cs +++ b/N_m3u8DL-CLI/Global.cs @@ -185,7 +185,7 @@ public static string GetWebSource(String url, string headers = "", int TimeOut = webRequest.AddRange(Convert.ToInt32(att.Substring(att.IndexOf(":") + 1).Split('-')[0], Convert.ToInt32(att.Substring(att.IndexOf(":") + 1).Split('-')[1]))); else if (att.Split(':')[0].ToLower() == "accept") webRequest.Accept = att.Substring(att.IndexOf(":") + 1); - else + else if(att.Split(':')[0].ToLower() != "accept-encoding") webRequest.Headers.Add(att); } catch (Exception e) From 16ecdc598ca579e75db34edf0a47f7cfd88cf0d6 Mon Sep 17 00:00:00 2001 From: xingyunjohn1 <32031270+xingyunjohn1@users.noreply.github.com> Date: Thu, 14 Jul 2022 04:18:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- N_m3u8DL-CLI/Global.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/N_m3u8DL-CLI/Global.cs b/N_m3u8DL-CLI/Global.cs index 24a6ad7..4249095 100644 --- a/N_m3u8DL-CLI/Global.cs +++ b/N_m3u8DL-CLI/Global.cs @@ -185,7 +185,7 @@ public static string GetWebSource(String url, string headers = "", int TimeOut = webRequest.AddRange(Convert.ToInt32(att.Substring(att.IndexOf(":") + 1).Split('-')[0], Convert.ToInt32(att.Substring(att.IndexOf(":") + 1).Split('-')[1]))); else if (att.Split(':')[0].ToLower() == "accept") webRequest.Accept = att.Substring(att.IndexOf(":") + 1); - else if(att.Split(':')[0].ToLower() != "accept-encoding") + else if (att.Split(':')[0].ToLower() != "accept-encoding") webRequest.Headers.Add(att); } catch (Exception e)