mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
fix: download block ua
This commit is contained in:
parent
7707e7854c
commit
06b43dd666
@ -184,7 +184,7 @@ func DownloadFileMultiThreading(url, path string, limit int64, threadCount int,
|
|||||||
req.Header.Set(k, v)
|
req.Header.Set(k, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := headers["User-Agent"]; ok {
|
if _, ok := headers["User-Agent"]; !ok {
|
||||||
req.Header["User-Agent"] = []string{UserAgent}
|
req.Header["User-Agent"] = []string{UserAgent}
|
||||||
}
|
}
|
||||||
req.Header.Set("range", "bytes="+strconv.FormatInt(block.BeginOffset, 10)+"-"+strconv.FormatInt(block.EndOffset, 10))
|
req.Header.Set("range", "bytes="+strconv.FormatInt(block.BeginOffset, 10)+"-"+strconv.FormatInt(block.EndOffset, 10))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user