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

Commit

Permalink
[#6] 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 8, 2020
1 parent 290c88a commit 07f4478
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 @@ -401,9 +401,12 @@ static S3Status compose_amz_headers(const RequestParams *params,
(unsigned long long) params->startByte,
(unsigned long long) (params->startByte + params->byteCount - 1) );
}
// And the x-amz-metadata-directive header
if (properties) {
headers_append(1, "%s", "x-amz-metadata-directive: REPLACE");
else {
// Add the x-amz-metadata-directive header
// Only for CopyObject, not UploadPartCopy (above)
if (properties) {
headers_append(1, "%s", "x-amz-metadata-directive: REPLACE");
}
}
}

Expand Down

0 comments on commit 07f4478

Please sign in to comment.