If the initial request contains a partNumber, we currently send it as a default request since we have not yet implemented downloading a single part with splitting.
If there was a range header without a startRange, we perform a HeadObject to determine the startRange first; otherwise, we execute a GetObject from the startRange.
If the size_hint indicates a small file, we execute GetObject with partNumber=1 to avoid the HeadObject for small files. If the actual part size exceeds our part_size, we cancel the request upon receiving the headers and retrieve the first part again as part of parallelized ranged gets. Otherwise, we perform a HeadObject to discover both the object size and checksum if available.
If checksum validation is enabled, we validate the checksum for part aligned ranged gets and also have a workaround to validate checksum if the file was uploaded as a single part but is now being downloaded as multipart. This is done using HeadObject or GetObject with partNumber=1.
When we do the first GetObject with range request to discover object size, it can fail if the file is empty. Now that we know the file is empty, we send another GetObject with partNumber=1 request to provide successful response headers to the user.
We perform multiple GetObject with range requests in parallel to download the remaining portion of the file once its total size is known.
If the initial request contains a partNumber, we currently send it as a default request since we have not yet implemented d...