Update Plain Craft Launcher 2/Modules/Base/ModNet.vb

Co-authored-by: tangge233 <50769997+tangge233@users.noreply.github.com>
This commit is contained in:
薄奚梦灵andtangge233 authored and GitHub committed 2025-06-23 20:45:34 +08:00
1 parent 65812b8754
commit 83e34b84fa
1 file changed
+1 -1
@@ -1212,7 +1212,7 @@ StartThread:
HttpRequest = Request.GetRequestMessage(Info.Source.Url,
RequireHeaderSign:=True)
'可能出现结束减去起始等于或者小于 0 的情况,导致下载抛出 ArgumentOutOfRangeException
If Not Info.DownloadEnd - Info.DownloadEnd <= 0 Then HttpRequest.Headers.Range = New RangeHeaderValue(Info.DownloadStart, Info.DownloadEnd)
If Not Info.IsFirstThread Then HttpRequest.Headers.Range = New RangeHeaderValue(Info.DownloadStart, Nothing)
HttpResponse = Request.SendRequest(HttpRequest, False, Timeout:=Timeout, RequireReturnRespObj:=True)
Dim ContentLength As Long = 0
Using HttpResponse