mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-07 09:00:47 +00:00
feat: downloader task stats (#339)
This commit is contained in:
1 parent
38ff711ea9
commit
6d136604db
7 files changed
+43
-13
No files matched your search
@@ -105,6 +105,7 @@ func (f *Fetcher) Resolve(req *base.Request) error {
|
||||
Range: false,
|
||||
Files: []*base.FileInfo{},
|
||||
}
|
||||
|
||||
if base.HttpCodePartialContent == httpResp.StatusCode || (base.HttpCodeOK == httpResp.StatusCode && httpResp.Header.Get(base.HttpHeaderAcceptRanges) == base.HttpHeaderBytes && strings.HasPrefix(httpResp.Header.Get(base.HttpHeaderContentRange), base.HttpHeaderBytes)) {
|
||||
// 1.返回206响应码表示支持断点下载 2.不返回206但是Accept-Ranges首部并且等于bytes也表示支持断点下载
|
||||
res.Range = true
|
||||
|
||||
Reference in new issue
Block a user