-
Notifications
You must be signed in to change notification settings - Fork 326
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
Empty blob access error using Java SDK #2458
Comments
@cnaj
|
Indeed, the Azure server responds with 416, too, but it was hidden by the Java Azure SDK. However, there seems to be a difference in the 416 response: The Azure server adds a Logs for the public Azure server:
Logs for Azurite:
No further GET is being performed for Azurite by the SDK. Logs were acquired by setting the environment variable |
Thanks for the PR! I've tested it with my Java reproduction test, but now the followup request generates a Test logs (as before):
Azurite debug log:
Looks like the Azure SDK sends |
I tried to search I also tried to send it with storage .net SDK, and get error "Specified argument was out of the range of valid values." from SDK side.
Azurite welcome contribution! The change should be in the function: Azurite/src/blob/utils/utils.ts Line 40 in 76f6262
Please make sure change log is updated, and enough test coverage in the PR. |
So it's actually the Java SDK's fault because it sends an invalid header. Nevertheless, it looks like Azure chooses to ignore the Range header (see https://httpwg.org/specs/rfc9110.html#field.range), either because of invalid range or because the content is empty. From the RFC:
and
We can see this from the fact that Azure reponds with In this case, I think that Azurite should implement the same behavior, and not accept the invalid range request, which would also fix my use case (and be usable with the Java SDK). I'd be glad to help (time permitting), but TypeScript is not my main strength... |
Thanks for the reply! Current Azurite reject the invalid range, this is also aligned with RFC. However, Azure server choose ignore it, which is also aligned with RFC. |
Which service(blob, file, queue, table) does this issue concern?
blob
Which version of the Azurite was used?
3.32.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
Docker
What's the Node.js version?
n/a
What problem was encountered?
Downloading an empty (0 bytes) blob from Azurite gives a 416 error response, while Azure works as expected. With version 3.31.0, both Azurite and Azure work as expected without an error.
This seems to contradict #2410, which reported the opposite behavior for an earlier Azurite version. As a consequence, #2417 was implemented.
Steps to reproduce the issue?
See https://github.com/cnaj/azurite-empty-blob-issue-demo for a reproduction of the issue.
Have you found a mitigation/solution?
no
The text was updated successfully, but these errors were encountered: