Right now, x-amz-metadata-directive: has no effect on a copy operation.
In all cases (REPLACE, COPY or missing), custom metadata specified is applied to the copied object, while non-conflicting metadata remains.
However, the behaviour should be that under REPLACE: Only the custom metadata should be applied, when COPYING (or when directive is missing), the existing custom metadata is copied, while any specified metadata is ignored.
Right now, x-amz-metadata- directive: has no effect on a copy operation.
In all cases (REPLACE, COPY or missing), custom metadata specified is applied to the copied object, while non-conflicting metadata remains.
However, the behaviour should be that under REPLACE: Only the custom metadata should be applied, when COPYING (or when directive is missing), the existing custom metadata is copied, while any specified metadata is ignored.