From 92847588cdc940ff27afdb17776f6c1ed733cfcb Mon Sep 17 00:00:00 2001 From: Justin James Date: Fri, 4 Dec 2020 22:43:30 -0500 Subject: [PATCH] Fixed range for S3_copy_object_range Fixes bji/libs3#102 --- src/request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request.c b/src/request.c index dd66863..ffe3afa 100644 --- a/src/request.c +++ b/src/request.c @@ -402,7 +402,7 @@ static S3Status compose_amz_headers(const RequestParams *params, if (params->byteCount > 0) { char byteRange[S3_MAX_METADATA_SIZE]; snprintf(byteRange, sizeof(byteRange), "bytes=%zd-%zd", - params->startByte, params->startByte + params->byteCount); + 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