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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gaul
Copy link

@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
Author

gaul commented Nov 9, 2024

@microsoft-github-policy-service agree

@gaul
Copy link
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
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

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