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

Use HEAD HTTP request to avoid downloading file twice #63

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

StefanScherer
Copy link
Contributor

I've tested the DockerMsftProvider in a VM with a simulated slow network connection and could reproduce the problem that the ZIP file isn't downloaded.
Looking closer it turns out that retrieving the download size is the problem. This has downloaded the whole zip file and then we retrieved the size.
This PR does a HEAD request to just retrieve the header and not the whole file.

install-package-docker-with-pr-fix

With the simulated 4MBit connection the download takes about 6-8 minutes and Invoke-WebRequest does a good job.

Fixes #15
Fixes MicrosoftDocs/Virtualization-Documentation#919

Credits: Thanks @InteXX for showing me #15 (comment) which helped me to find the root cause of the problem.

@cwilhit
Copy link
Contributor

cwilhit commented Aug 26, 2019

LGTM. Thanks!

@cwilhit cwilhit merged commit d8f0374 into OneGet:developer Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants