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

Question: how to obtain checksum for partial content downloaded via download_range APIs? #286

Open
yxiang92128 opened this issue Sep 10, 2019 · 4 comments
Labels

Comments

@yxiang92128
Copy link

Is there a way (via API itself or via http header) from the blob backend/Azure SDK to supply a MD5 checksum if we download a range of bytes stream from an object?
ie, on receiving end, if we compute the checksum and check against the checksum from the backend, we can match or dismiss the content partially downloaded?

Thanks,

Yang

@EmmaZhu
Copy link
Member

EmmaZhu commented Sep 12, 2019

Hi Yang,

download_range_to_stream can validate range's content md5 if :

  • use_transactional_md5 in blob_request_options is set to true
  • range length is less than 4MB

For a request to download a range, Azure Storage Server returns content-md5 from the response. In client side, we calculate the downloaded data's MD5 and compare it to the value returned from Azure Storage Server.

Is this behavior OK for your scenario?

Thanks
Emma

@yxiang92128
Copy link
Author

@EmmaZhu Actually we are hoping the MD5 value to be returned to us and we can calculate the md5 in the receiving buffer and compare ourselves. Is it possible?

@Jinming-Hu
Copy link
Member

Maybe related to #271 .

Also, you may want to disable checksum validation inside SDK by using blob_request_options::set_disable_content_md5_validation(true)

@Jinming-Hu
Copy link
Member

We're going to close this issue because of inactivity, feel free to reopen it if you have any further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants