mirror of
https://github.com/munki/munki.git
synced 2026-01-23 23:49:22 -06:00
Gurl requires the expected content length in the xattr data in order to consider resuming a partial download. When there is a network connection interruption URLSession_task_didCompleteWithError_ is called with an error. Prior to this fix content length was always removed from the xattr data when URLSession_task_didCompleteWithError_ was called so downloads would never resume after a connection error. With this fix, content length is only removed from the xattr data when there is no error since the download would be complete and resuming would not be necessary.