Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle getting zero-length blobs with Content-Range #2486

Closed
wants to merge 1 commit into from

Conversation

gaul
Copy link
Contributor

@gaul gaul commented Nov 9, 2024

This behavior matches Azure. AWS Java SDK probes for a zero-length blob when a request with a Content-Range fails.

@gaul
Copy link
Contributor Author

gaul commented Nov 9, 2024

@microsoft-github-policy-service agree

@gaul
Copy link
Contributor Author

gaul commented Nov 9, 2024

This is difficult to add a test for since the AWS JavaScript SDK doesn't allow sending a zero range:

          range: offset === 0 && !count ? undefined : rangeToString({ offset, count }),

https://github.com/Azure/azure-sdk-for-js/blob/fe02d22be5944988b89f22421c0dcc428c1ae525/sdk/storage/storage-blob/src/Clients.ts#L1235

@gaul
Copy link
Contributor Author

gaul commented Nov 9, 2024

See related Azure/azure-sdk-for-java#42870.

This behavior matches Azure.  AWS Java SDK probes for a zero-length
blob when a request with a Content-Range fails.
@blueww
Copy link
Member

blueww commented Nov 11, 2024

The change of this PR is almost covered by #2462.
Besides that, Azurite unit test cases based on JS SDK, which support send 0 range. See the test case change in #2462

@blueww
Copy link
Member

blueww commented Jan 14, 2025

Close as the PR #2462 merged, which covers fix of this PR.

@blueww blueww closed this Jan 14, 2025
@gaul gaul deleted the range branch January 14, 2025 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants