Package: apt
Version: 2.9.10
X-Debbugs-CC: ogn...@ognyankulev.com

Each `apt update` downloads fully the specified mirrorlist file, instead of using If-Modified-Since: HTTP header to skip downloading the same content.

Comparing it to other downloads, mirrorlist files are not downloaded first into partial/ but anyway apt treats them as partial and requests continuing the "partial" download. When this fails, the file is downloaded completely. The expected behavior is requests to have If-Modified-Since: HTTP header like other already downloaded files. A sample session follows:

Fetching mirror+https://fire.tower.3.bg/debian-mirrorlist.txt/dists/testing/InRelease to /var/lib/apt/lists/partial/fire.tower.3.bg_debian-mirrorlist.txt_dists_testing_InRelease
 Queue is: mirror+https
Fetching https://fire.tower.3.bg/debian-mirrorlist.txt
 to /var/lib/apt/lists/auxfiles/fire.tower.3.bg_debian-mirrorlist.txt
 Queue is: https:fire.tower.3.bg
GET /debian-mirrorlist.txt HTTP/1.1
Host: fire.tower.3.bg
Range: bytes=1673-
If-Range: Sat, 02 Nov 2024 18:11:05 GMT
User-Agent: Debian APT-HTTP/1.3 (2.9.10)

Answer for: https://fire.tower.3.bg/debian-mirrorlist.txt
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 02 Nov 2024 18:11:14 GMT
Content-Type: text/plain
Content-Length: 1673
Last-Modified: Sat, 02 Nov 2024 13:05:14 GMT
Connection: keep-alive
ETag: "6726238a-689"
Accept-Ranges: bytes


Best regards,
Ognyan

Reply via email to