Files
munki/code
Kyle Crawford 975f649239 Keep content-length on network connection error so downloads can resume (#1057)
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.
2020-11-25 09:45:22 -08:00
..