refactor(net): pass request header (#8031 close #8008)

* refactor(net): pass request header

* feat(proxy): add `Etag` to response header

* refactor
This commit is contained in:
j2rong4cn
2025-03-01 18:35:34 +08:00
committed by GitHub
parent 646c7bcd21
commit 4145734c18
14 changed files with 56 additions and 44 deletions

View File

@ -382,6 +382,9 @@ func (d *downloader) tryDownloadChunk(params *HttpRequestParams, ch *chunk) (int
if resp == nil {
return 0, err
}
if resp.StatusCode == http.StatusRequestedRangeNotSatisfiable {
return 0, err
}
if ch.id == 0 { //第1个任务 有限的重试,超过重试就会结束请求
switch resp.StatusCode {
default: