|
1 | 1 | diff --git a/Pods/Alamofire/Source/Core/SessionDelegate.swift b/Pods/Alamofire/Source/Core/SessionDelegate.swift |
2 | | -index de0fcbb..5ebacfa 100644 |
| 2 | +index 1d120e6..fe8f5b9 100644 |
3 | 3 | --- a/Pods/Alamofire/Source/Core/SessionDelegate.swift |
4 | 4 | +++ b/Pods/Alamofire/Source/Core/SessionDelegate.swift |
5 | | -@@ -343,8 +343,15 @@ extension SessionDelegate: URLSessionDownloadDelegate { |
| 5 | +@@ -343,6 +343,15 @@ extension SessionDelegate: URLSessionDownloadDelegate { |
6 | 6 | return |
7 | 7 | } |
8 | 8 |
|
9 | | -- downloadRequest.updateDownloadProgress(bytesWritten: bytesWritten, |
10 | | -+ let sizeString = ((downloadTask.response as? HTTPURLResponse)?.allHeaderFields["X-Uncompressed-Content-Length"]) as? String |
| 9 | ++ let allHeaders = (downloadRequest.response)?.allHeaderFields as? NSDictionary ?? NSDictionary() |
| 10 | ++ let sizeString = (allHeaders["X-Uncompressed-Content-Length"] ?? allHeaders["x-uncompressed-content-length"]) as? String |
11 | 11 | + if (sizeString != nil) { |
12 | 12 | + let size = Int64(sizeString!) |
13 | 13 | + downloadRequest.updateDownloadProgress(bytesWritten: bytesWritten, |
14 | | - totalBytesExpectedToWrite: totalBytesExpectedToWrite) |
15 | | -+ } else { |
16 | | -+ downloadRequest.updateDownloadProgress(bytesWritten: bytesWritten, |
17 | | -+ totalBytesExpectedToWrite: totalBytesExpectedToWrite) |
| 14 | ++ totalBytesExpectedToWrite: size!) |
| 15 | ++ return |
18 | 16 | + } |
| 17 | ++ |
| 18 | + downloadRequest.updateDownloadProgress(bytesWritten: bytesWritten, |
| 19 | + totalBytesExpectedToWrite: totalBytesExpectedToWrite) |
19 | 20 | } |
20 | | - |
21 | | - open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { |
0 commit comments