mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-28 16:36:36 +08:00
修复分区内容长度判断错误的问题
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user