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

Perform integrity check after file download #37

Merged
merged 5 commits into from
Dec 5, 2023
Merged

Perform integrity check after file download #37

merged 5 commits into from
Dec 5, 2023

Conversation

rosbo
Copy link
Contributor

@rosbo rosbo commented Dec 5, 2023

@rosbo rosbo requested a review from Philmod December 5, 2023 18:17
if hash_object:
actual_md5_hash = to_b64_digest(hash_object)
if actual_md5_hash != expected_md5_hash:
os.remove(out_file) # Delete the corrupted file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we test this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a lot of new tests to test resumable download, corrupted files, hash with resumable & non-resumable case, etc.

@rosbo rosbo merged commit 02be80b into main Dec 5, 2023
@rosbo rosbo deleted the integrity-check branch December 5, 2023 22:12
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