Remove EmptyObjectRangeNotSatisfiableException, add presigned URL Javadoc and checksum test#7095
Merged
jencymaryjoseph merged 1 commit intoJul 1, 2026
Conversation
davidh44
approved these changes
Jul 1, 2026
b50b3d0
into
feature/master/pre-signed-url-getobject
6 checks passed
|
This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Cleans up the 416 fallback mechanism, documents presigned URL limitations, and adds data-integrity regression testing.
416 cleanup: When a presigned URL multipart download sends a ranged GET to an object that has been replaced with an empty object (0 bytes), S3 returns HTTP 416 (Range Not Satisfiable). The SDK handles this by falling back to a non-ranged GET.
The parallel subscriber wrapped this 416 in
EmptyObjectRangeNotSatisfiableExceptionso the catch inPresignedUrlDownloadHelpercould distinguish it from other errors and trigger the fallback. SinceisRangeNotSatisfiable()already detects raw 416s from any path (parallel or serial), the wrapper is redundant, removing it simplifies the error handling to a single check.The parallel subscriber wrapped 416 errors inEmptyObjectRangeNotSatisfiableExceptionso the fallback catch could identify them. SinceisRangeNotSatisfiable()already detects raw 416s from any path, the wrapper is redundant, removing it simplifies the error handling.Javadoc: Customers have no documentation on which signed headers are supported for presigned URL downloads. Without it, they'll hit
SignatureDoesNotMatcherrors with no guidance on what went wrong.When a presigned URL is generated with header-location fields (like Range, If-Match, SSE-C headers etc.), those headers get signed into the URL. At download time, the SDK needs to replay them, as the URL will not have the header values. But we currently only support replaying Range and If-Match (via the builder methods) and x-amz-checksum-mode (automatically by the SDK). Any other signed headers can't be replayed, causing S3 to reject the request with
SignatureDoesNotMatch. The Javadoc makes this clear so customers know upfront which presigned URL configurations are supported.Checksum regression test: Added integration tests validating that downloaded bytes via presigned URLs match the uploaded content. This test proves data integrity across client types, object sizes, and transformer types.
Modifications
isRangeNotSatisfiable(cause)only. DeletedEmptyObjectRangeNotSatisfiableException.Range,If-Match, andx-amz-checksum-modeare not supported.x-amz-checksum-modeis replayed automatically by the SDK.Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License