From 5b6394c37c883b1cd66c0528a9b92002e754479d Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Fri, 8 Dec 2023 14:21:23 -0800 Subject: [PATCH] cleanup --- source/s3_auto_ranged_get.c | 66 ------------------------------------- 1 file changed, 66 deletions(-) diff --git a/source/s3_auto_ranged_get.c b/source/s3_auto_ranged_get.c index 8ad63318d..3b542172b 100644 --- a/source/s3_auto_ranged_get.c +++ b/source/s3_auto_ranged_get.c @@ -218,72 +218,6 @@ static bool s_s3_auto_ranged_get_update( } request->discovers_object_size = true; goto has_work_remaining; - // bool headObjectRequired = auto_ranged_get->initial_message_has_range_header != 0; - // headObjectRequired = - // headObjectRequired || - // (meta_request->checksum_config.validate_response_checksum && - // (auto_ranged_get->size_hint == 0 || auto_ranged_get->size_hint > meta_request->part_size)); - // /* If there exists a range header, we currently always do a head request first. For the range header - // * value could be parsed client-side, doing so presents a number of complications. For example, the - // * given range could be an unsatisfiable range, and might not even specify a complete range. To keep - // * things simple, we are currently relying on the service to handle turning the Range header into a - // * Content-Range response header.*/ - // if (headObjectRequired) { - // // TODO: align the first part - - // } else { - // /* Get the object range from the first request */ - - // if (meta_request->checksum_config.validate_response_checksum) { - // /* - // * Discover the size of the object while attempting to retrieve the first part. We use - // * getFirstPart instead of a ranged get to do checksum validation for objects not uploaded - // * via MPU. If the first part is not equal to the part_size, we cancel the request - // * upon receiving the headers, which is similar to a head request. This approach helps to - // avoid - // * an extra head request for small files. - // */ - // struct aws_s3_buffer_pool_ticket *ticket = - // aws_s3_buffer_pool_reserve(meta_request->client->buffer_pool, meta_request->part_size); - - // if (ticket == NULL) { - // goto has_work_remaining; - // } - - // request = aws_s3_request_new( - // meta_request, - // AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_PART_NUMBER, - // AWS_S3_REQUEST_TYPE_GET_OBJECT, - // 1 /*part_number*/, - // AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS | - // AWS_S3_REQUEST_FLAG_PART_SIZE_RESPONSE_BODY); - // request->ticket = ticket; - // auto_ranged_get->synced_data.get_first_part_sent = true; - // } else { - // /* If checksum validation is not required, then discover the size of the object during the - // * first ranged get request. */ - // struct aws_s3_buffer_pool_ticket *ticket = - // aws_s3_buffer_pool_reserve(meta_request->client->buffer_pool, meta_request->part_size); - - // if (ticket == NULL) { - // goto has_work_remaining; - // } - - // request = aws_s3_request_new( - // meta_request, - // AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_RANGE, - // AWS_S3_REQUEST_TYPE_GET_OBJECT, - // 1 /*part_number*/, - // AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS | - // AWS_S3_REQUEST_FLAG_PART_SIZE_RESPONSE_BODY); - // request->part_range_start = 0; - // request->part_range_end = meta_request->part_size - 1; /* range-end is inclusive */ - // request->ticket = ticket; - // } - // request->discovers_object_size = true; - // } - - // goto has_work_remaining; } /* If the object range is known and that range is empty, then we have an empty file to request. */