mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-19 12:16:24 +08:00
fix(net): ensure accurate content-length in response (#749)
* fix(fs): ensure accurate content-length in http2 requests Chrome browsers were unable to preview thumbnails, reporting an 'ERR_HTTP_2_PROTOCOL_ERROR'. This was caused by an incorrect content-length header in the server's response for thumbnail images. This commit corrects the content-length calculation, allowing Chrome and other compliant clients to render thumbnails correctly. * fix(net): ensure accurate content-length in response * 补缺 * . --------- Co-authored-by: zhiqiang.huang <zhiqiang.tech@gmail.com> Co-authored-by: j2rong4cn <j2rong@qq.com>
This commit is contained in:
@ -33,8 +33,9 @@ type Link struct {
|
||||
Expiration *time.Duration // local cache expire Duration
|
||||
|
||||
//for accelerating request, use multi-thread downloading
|
||||
Concurrency int `json:"concurrency"`
|
||||
PartSize int `json:"part_size"`
|
||||
Concurrency int `json:"concurrency"`
|
||||
PartSize int `json:"part_size"`
|
||||
ContentLength int64 `json:"-"` // 转码视频、缩略图
|
||||
|
||||
utils.SyncClosers `json:"-"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user