Comment 18 for bug 1445239

Revision history for this message
Anton Blanchard (anton-samba) wrote :

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.