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

Content-Range response header exception for empty files #26871

Closed
daviddavis opened this issue Oct 17, 2022 · 3 comments
Closed

Content-Range response header exception for empty files #26871

daviddavis opened this issue Oct 17, 2022 · 3 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)

Comments

@daviddavis
Copy link
Member

daviddavis commented Oct 17, 2022

  • Package Name: azure-blog-storage
  • Package Version: 12.14.0
  • Operating System: all
  • Python Version: 3.10

Describe the bug
This commit checks for missing or invalid content range headers. However, there's a problem with the check because the exception gets raised if the file is empty (ie self._file_size is 0).

To Reproduce
Steps to reproduce the behavior:

  1. Upload an empty file to azure blob storage
  2. Attempt to download it with azure-blob-storage

Expected behavior
File downloads properly.

@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Oct 17, 2022
@azure-sdk azure-sdk added Client This issue points to a problem in the data-plane of the library. needs-team-triage Workflow: This issue needs the team to triage. Storage Storage Service (Queues, Blobs, Files) labels Oct 17, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Oct 17, 2022
daviddavis added a commit to daviddavis/azure-sdk-for-python that referenced this issue Oct 17, 2022
daviddavis added a commit to daviddavis/azure-sdk-for-python that referenced this issue Oct 17, 2022
@jalauzon-msft jalauzon-msft removed the needs-team-triage Workflow: This issue needs the team to triage. label Oct 17, 2022
@jalauzon-msft
Copy link
Member

Thanks for finding this and fixing it (#26872). This is definitely a regression introduced in our latest release. I will work on getting a patch release out with the fix ASAP.

@daviddavis
Copy link
Member Author

@jalauzon-msft it looks like you were right. I think this is an azurite issue:

Azure/Azurite#1682

@jalauzon-msft
Copy link
Member

@daviddavis, thanks. I was also just able to confirm this with local testing. I think the fix is ultimately still a valid one for the SDK though. Checking versus None is better than just "False".

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

4 participants