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

Enable auto-resume in curl command. #894

Closed
wants to merge 1 commit into from

Conversation

sam-falvo
Copy link

Address (partially) the need for resumability if the server provides
it. See #889

Address (partially) the need for resumability if the server provides
it.  See rust-lang#889
@brson
Copy link
Contributor

brson commented Jan 7, 2017

Thanks for the patch. I left a comment on the ticket about resuming downloads.

As written, I think this will be ineffective because the destination is a random temporary directory. To make this work I think the script would need to create a directory in ~/.rustup, and put the file there. Even still, one has to figure out what to name the file to find it later. We can't just download rustup-init and resume it later because the contents of that file change from release to release; so if we were to resume it it would be possible to splice two different binaries together (unless HTTP resume has some recovery mechanism to prevent that).

One way to fix that problem would be to first download rustup-init.sha256, parse the hash out, name the file after the hash. Another way to ameliorate the problem would be to validate the hash after the download.

@sam-falvo
Copy link
Author

In light of what I've learned, I think I can close and disregard this PR. This problem definitely needs more study to be robust against concurrent link failures and version updates. Thanks for the info!

@sam-falvo sam-falvo closed this Jan 7, 2017
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