I think I see the issue. We parse both Content-Length: and Content-
Range: headers.

When parsing the Content-Range: header, we set Size to the total size of
the file.

If the Content-Length header comes last, we reset Size to the size of
the data we are receiving, not the total size of the file.

The attached patch fixes it for me, although we do get the infamous Hash
sum mismatch which clears after rerunning apt-get:

Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/vivid-
security/universe/i18n/Translation-en  Hash Sum mismatch

Another issue, but I'd love to fix that one day.

** Patch added: "Don't parse Content-Length if Content-Range has been parsed"
   
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1445239/+attachment/4396561/+files/apt-fills-disk.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1445239

Title:
  apt's lists/partial fills disk

To manage notifications about this bug go to:
https://bugs.launchpad.net/apt/+bug/1445239/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to