From a561d91517fb39617a22dc35a3907d8d5616f429 Mon Sep 17 00:00:00 2001 From: Michael Bonfils Date: Thu, 3 Oct 2019 09:02:34 +0000 Subject: [PATCH] Extract ETag for MPU Part Copy 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 --- src/object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/object.c b/src/object.c index e8df4b0..483c9f8 100644 --- a/src/object.c +++ b/src/object.c @@ -112,7 +112,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]),