Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Jun 20, 2023
1 parent 015937e commit fe1c29e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/s3_auto_ranged_put.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit fe1c29e

Please sign in to comment.