federation: Honor range with UploadObjectPart to a different cluster (#10570)

Use gr & length instead of srcInfo.Reader & srcInfo.Size because 
they don't honor range header
This commit is contained in:
Anis Elleuch 2020-09-25 20:06:42 +01:00 committed by GitHub
parent b302c8a5f4
commit 9603489dd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1916,7 +1916,7 @@ func (api objectAPIHandlers) CopyObjectPartHandler(w http.ResponseWriter, r *htt
}
partInfo, err := core.PutObjectPart(ctx, dstBucket, dstObject, uploadID, partID,
srcInfo.Reader, srcInfo.Size, "", "", dstOpts.ServerSideEncryption)
gr, length, "", "", dstOpts.ServerSideEncryption)
if err != nil {
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r))
return