mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
s3: Return correct error XML tag in case of copy object (#12427)
In Copy Object S3 API, the server does not return correct bucket & object names when the source bucket/object does not exist, this commit fixes it.
This commit is contained in:
parent
30a3921d3e
commit
3109441258
@ -1035,6 +1035,10 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
|
||||
w.Header()[xhttp.AmzDeleteMarker] = []string{strconv.FormatBool(gr.ObjInfo.DeleteMarker)}
|
||||
}
|
||||
}
|
||||
// Update context bucket & object names for correct S3 XML error response
|
||||
reqInfo := logger.GetReqInfo(ctx)
|
||||
reqInfo.BucketName = srcBucket
|
||||
reqInfo.ObjectName = srcObject
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r))
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user