file_utils: raise error for failed downloads, use redirects
ClosedPublic

Authored by kparal on Jul 7 2016, 4:07 PM.

Details

Summary

Two fixes:

  1. raise error when file download fails (HTTP 4xx or 5xx)
  2. use redirects when checking for the same file size (requests.head()

does not automatically follow redirects)

This has been discovered in D916.

Test Plan

tested manually, 404 URLs now raise errors, download caching still seems to work

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kparal retitled this revision from to file_utils: raise error for failed downloads, use redirects.Jul 7 2016, 4:07 PM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added a reviewer: libtaskotron.
jskladan accepted this revision.Jul 8 2016, 6:59 AM
jskladan added a reviewer: jskladan.
This revision is now accepted and ready to land.Jul 8 2016, 6:59 AM
This revision was automatically updated to reflect the committed changes.