X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8b79c94af7f7cf2e5e5342294bc6e5a908cacabf..cc0a4c82b3c132abba9b9ec35fd61bc8b45a1b80:/methods/http.cc diff --git a/methods/http.cc b/methods/http.cc index b861e61ee..fc54ece3a 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -441,12 +441,12 @@ bool HttpServerState::RunData(FileFd * const File) { /* Closes encoding is used when the server did not specify a size, the loss of the connection means we are done */ - if (Persistent == false) - In.Limit(-1); - else if (JunkSize != 0) + if (JunkSize != 0) In.Limit(JunkSize); - else + else if (DownloadSize != 0) In.Limit(DownloadSize); + else if (Persistent == false) + In.Limit(-1); // Just transfer the whole block. do