From 17788818aba604eee201e97bdf41e0c46d66a804 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 26 Jul 2023 14:48:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E5=8C=BA=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E9=95=BF=E5=BA=A6=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_writer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/nodes/http_writer.go b/internal/nodes/http_writer.go index b5984ff..ac523e1 100644 --- a/internal/nodes/http_writer.go +++ b/internal/nodes/http_writer.go @@ -324,11 +324,11 @@ func (this *HTTPWriter) PrepareCache(resp *http.Response, size int64) { // 待写入尺寸 var totalSize = size - if totalSize < 0 && this.isPartial { + if this.isPartial { var contentRange = resp.Header.Get("Content-Range") if len(contentRange) > 0 { _, partialTotalSize := httpRequestParseContentRangeHeader(contentRange) - if partialTotalSize > 0 { + if partialTotalSize > 0 && partialTotalSize > totalSize { totalSize = partialTotalSize } }