Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Only send x-amz-metadata-directive on CopyObject
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinKyleJames authored and trel committed Dec 9, 2020
1 parent 287e4be commit 054a76a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,12 @@ static S3Status compose_amz_headers(const RequestParams *params,
params->startByte, params->startByte + params->byteCount);
append_amz_header(values, 0, "x-amz-copy-source-range", byteRange);
}
// And the x-amz-metadata-directive header
if (properties) {
append_amz_header(values, 0, "x-amz-metadata-directive", "REPLACE");
else {
// Add the x-amz-metadata-directive header
// Only for CopyObject, not UploadPartCopy (above)
if (properties) {
append_amz_header(values, 0, "x-amz-metadata-directive", "REPLACE");
}
}
}

Expand Down

0 comments on commit 054a76a

Please sign in to comment.