mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
CopyObject: fix read/write err on closed pipe (#15135)
Fixes: #15128 Regression from PR#14971
This commit is contained in:
@@ -1433,10 +1433,6 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
|
||||
srcInfo.metadataOnly = false
|
||||
}
|
||||
|
||||
if srcInfo.metadataOnly {
|
||||
gr.Close() // We are not interested in the reader stream at this point close it.
|
||||
}
|
||||
|
||||
// Check if x-amz-metadata-directive or x-amz-tagging-directive was not set to REPLACE and source,
|
||||
// destination are same objects. Apply this restriction also when
|
||||
// metadataOnly is true indicating that we are not overwriting the object.
|
||||
|
||||
Reference in New Issue
Block a user