apt-get update issues invalid range requests for previously completed downloads
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When an apt-get update fails, for instance due to a mismatch between the Release and Packages.gz due to a mirror sync/index update, it leaves files in the /var/lib/
15466565 16 -rw-r--r-- 1 root root 13860 Oct 22 12:50 /var/lib/
15466663 4 -rw-r--r-- 1 root root 475 Oct 22 12:50 /var/lib/
15471150 0 -rw-r--r-- 1 root root 0 Oct 22 12:52 /var/lib/
In this case both Release and Release.gpg were complete, however when running apt-get update again it issues the revalidation requests for these resources with Range headers that are the length of the file resulting in '416 Requested Range Not Satisfiable':
GET .../Release HTTP/1.1
Cache-Control: max-age=0
Accept: text/*
Range: bytes=13860-
If-Range: Tue, 22 Oct 2019 12:50:05 GMT
User-Agent: Debian APT-HTTP/1.3 (1.6.12)
HTTP/1.1 416 Requested Range Not Satisfiable
It appears:
- There's no way for apt-get to know if the file is complete so this logic will always be hit if the file exists https:/
- The logic for determining whether a server supports range requests is only entered if an Accept-Range header exists, however an absence of this header means support is not available - https:/
Excuse the slightly bogus filenames in that listing - I manually redacted our host/distribution details.