cuducos / chunk

🧱 Chunk is a download manager for slow and unstable servers
MIT License
56 stars 3 forks source link

Uses retries (if needed) for the HEAD requests to get the download file size #22

Closed cuducos closed 1 year ago

cuducos commented 1 year ago

I wrapped the request and the HTTP status check on the retry block, so we only proceed if there's no error and the HTTP status is OK.

This branch has two commits from #21 because the HEAD request behaviour needed the same fixes as there.

I decided to change uint64 to int64 because I've found out that an error in conversion would make debugging way more difficult. Happy to revert that once the package is more stable.