]> git.saurik.com Git - apt.git/commit
properly handle expected filesize in https
authorDavid Kalnischkies <david@kalnischkies.de>
Tue, 7 Apr 2015 12:34:04 +0000 (14:34 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Tue, 7 Apr 2015 15:20:35 +0000 (17:20 +0200)
commita2679f55b5b14092db88fab3799f06e6b68e439e
tree6cf55ae5fcc8e581fbf50b79959608c730147c45
parent7fddeb55af9c022fd96343d9cd700c946dbf8a01
properly handle expected filesize in https

The worker expects that the methods tell him when they start or finish
downloading a file. Various information pieces are passed along in this report
including the (expected) filesize. https is using a "global" struct for
reporting which made it 'reuse' incorrect values in some cases like a
non-existent InRelease fallbacking to Release{,.gpg} resulting in an incorrect
size-mismatch warning scaring and desensitizing users as well as being subject
to a race between the write_data and progress callbacks generating incorrect
progress reporting and potentially the same error message.

Other branches as well as the bugreports contain 'better' fixes making the
struct local and other sensible changes, but are larger as a result, so in
this version we opted for short diff with minimal effect above else instead.

Closes: 777565, 781509
Thanks: Robert Edmonds and Anders Kaseorg for initial patchs
methods/https.cc