Skip to content

Commit

Permalink
[irods#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 7, 2020
1 parent 7ee2ad4 commit 41f6b98
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 @@ -418,9 +418,12 @@ static S3Status compose_amz_headers(const RequestParams *params,
params->startByte, params->startByte + params->byteCount - 1);
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 41f6b98

Please sign in to comment.