perf(copy): use multi-thread downloader (close #5000)

This commit is contained in:
Andy Hsu
2023-08-13 15:31:49 +08:00
parent 0b675d6c02
commit 5606c23768
7 changed files with 57 additions and 36 deletions

View File

@ -120,10 +120,10 @@ func (r Range) contentRange(size int64) string {
}
// ApplyRangeToHttpHeader for http request header
func ApplyRangeToHttpHeader(p Range, headerRef *http.Header) *http.Header {
func ApplyRangeToHttpHeader(p Range, headerRef http.Header) http.Header {
header := headerRef
if header == nil {
header = &http.Header{}
header = http.Header{}
}
if p.Start == 0 && p.Length < 0 {
header.Del("Range")