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

Commit

Permalink
Extract ETag for MPU Part Copy
Browse files Browse the repository at this point in the history
When an MPU object is created with `x-amz-copy-source`/`x-amz-copy-source-range`,
libs3 was expecting the ETag in `CopyObjectResult/ETag` instead of
`CopyPartResult/ETag`.

Ref: https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html
  • Loading branch information
murlock committed Oct 3, 2019
1 parent a30e55e commit 0f5c603
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ static S3Status copyObjectXmlCallback(const char *elementPath,
if (!strcmp(elementPath, "CopyObjectResult/LastModified")) {
string_buffer_append(coData->lastModified, data, dataLen, fit);
}
else if (!strcmp(elementPath, "CopyObjectResult/ETag")) {
else if (!strcmp(elementPath, "CopyObjectResult/ETag")
|| !strcmp(elementPath, "CopyPartResult/ETag")) {
if (coData->eTagReturnSize && coData->eTagReturn) {
coData->eTagReturnLen +=
snprintf(&(coData->eTagReturn[coData->eTagReturnLen]),
Expand Down

0 comments on commit 0f5c603

Please sign in to comment.