munki / macadmin-scripts

Scripts of possible interest to macOS admins
Other
2.33k stars 523 forks source link

Fix resume download by not using cache date. #20

Open fredericgermain opened 5 years ago

fredericgermain commented 5 years ago

Do not use cache date if trying to resume download: if the "If-Modified-Since:" HTTP header is present, Apple servers ignores the Range: HTTP header.

fredericgermain commented 5 years ago

So actually, my patch fails when the file is complete (needed to download the big dmg file to see that), the server might send a 416 range not satisfiable.

I would just ignore curl error in this case maybe, the script would work. Getting detailed error with the python/curl subprocess is quite cumbersome...

craig65535 commented 3 years ago

I think this is obsoleted by #84