Only copy the content-range header
This commit is contained in:
@@ -177,11 +177,9 @@ func (dl *Downloader) streamFileToResponse(
|
||||
return
|
||||
}
|
||||
|
||||
// Copy the headers from the download response to the response
|
||||
for k, vv := range downloadResp.Header {
|
||||
for _, v := range vv {
|
||||
resp.Header().Add(k, v)
|
||||
}
|
||||
// Copy the content-range header from the download response to the response
|
||||
if cr := downloadResp.Header.Get("Content-Range"); cr != "" {
|
||||
resp.Header().Set("Content-Range", cr)
|
||||
}
|
||||
|
||||
buf := make([]byte, cfg.GetNetworkBufferSize())
|
||||
|
||||
Reference in New Issue
Block a user