Allow CopyObject() in S3 gateway to support metadata (#5000)

Fixes #4924
This commit is contained in:
Harshavardhana
2017-10-03 10:38:25 -07:00
committed by Dee Koder
parent 53f3d2fd65
commit 89d528a4ed
14 changed files with 194 additions and 6045 deletions

View File

@@ -398,7 +398,9 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
if err != nil {
errorIf(err, "found invalid http request header")
writeErrorResponse(w, ErrInternalError, r.URL)
return
}
// Check if x-amz-metadata-directive was not set to REPLACE and source,
// desination are same objects.
if !isMetadataReplace(r.Header) && cpSrcDstSame {