From fe1c29eb91019b19e28dbc15a66c37621756dbf8 Mon Sep 17 00:00:00 2001 From: Dmitriy Musatkin Date: Tue, 20 Jun 2023 18:22:49 +0100 Subject: [PATCH] add comment --- source/s3_auto_ranged_put.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/s3_auto_ranged_put.c b/source/s3_auto_ranged_put.c index 4dfaec108..045af6ac1 100644 --- a/source/s3_auto_ranged_put.c +++ b/source/s3_auto_ranged_put.c @@ -1158,7 +1158,9 @@ static void s_s3_prepare_upload_part_on_read_done(void *user_data) { /* Reading succeeded. */ bool is_body_stream_at_end = aws_future_bool_get_result(part_prep->asyncstep2_read_part); - request->is_noop = request->request_body.len == 0 && request->part_number > 1; + request->is_noop = + request->part_number > 1 && /* allow first part to have 0 length to support empty unknown content length objects. */ + request->request_body.len == 0; /* If Content-Length is defined, check that we read the expected amount */ if (has_content_length && (request->request_body.len < request->request_body.capacity)) {