mirror of
https://github.com/minio/minio.git
synced 2025-11-21 18:26:04 -05:00
Use multipart call for replication (#12535)
if object was uploaded with multipart. This is to ensure that GetObject calls with partNumber in URI request parameters have same behavior on source and replication target.
This commit is contained in:
committed by
GitHub
parent
a6ad965799
commit
a3f0288262
@@ -3115,9 +3115,15 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite
|
||||
|
||||
setEventStreamHeaders(w)
|
||||
|
||||
opts, err := completeMultipartOpts(ctx, r, bucket, object)
|
||||
if err != nil {
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
w = &whiteSpaceWriter{ResponseWriter: w, Flusher: w.(http.Flusher)}
|
||||
completeDoneCh := sendWhiteSpace(w)
|
||||
objInfo, err := completeMultiPartUpload(ctx, bucket, object, uploadID, completeParts, ObjectOptions{})
|
||||
objInfo, err := completeMultiPartUpload(ctx, bucket, object, uploadID, completeParts, opts)
|
||||
// Stop writing white spaces to the client. Note that close(doneCh) style is not used as it
|
||||
// can cause white space to be written after we send XML response in a race condition.
|
||||
headerWritten := <-completeDoneCh
|
||||
|
||||
Reference in New Issue
Block a user