From 47b1c8a9a28a39a002c9dac972f14b8752b65ea5 Mon Sep 17 00:00:00 2001 From: Zorg Date: Wed, 28 Dec 2016 12:39:18 -0500 Subject: [PATCH] Expected content length from http header should not be accumulated --- Sparkle/SPUDownloadDriver.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sparkle/SPUDownloadDriver.m b/Sparkle/SPUDownloadDriver.m index 1e2b30af..e4bc5553 100644 --- a/Sparkle/SPUDownloadDriver.m +++ b/Sparkle/SPUDownloadDriver.m @@ -193,9 +193,10 @@ self.retrievedDownloadResponse = YES; } - // Accumulate expected content length from downloader so we can later verify if the total length matches with the content length from the appcast + // Reset expected content length from downloader + // Later we verify if the total length matches with the content length from the appcast if (expectedContentLength > 0 && expectedContentLength != NSURLResponseUnknownLength) { - self.expectedContentLength += (NSUInteger)expectedContentLength; + self.expectedContentLength = (NSUInteger)expectedContentLength; } }); }