Comment 1 for bug 1655431

Revision history for this message
Adrien Beau (adrienbeau) wrote : Re: update-notifier / ttf-mscorefonts-installer download failure (regression)

Digging into update-notifier-common, it appears the actual failure can be reduced to the following command-line (for 1 of the 11 downloads):

/usr/lib/apt/apt-helper \
  download-file \
  http://downloads.sourceforge.net/corefonts/andale32.exe \
  /tmp/andale32.exe \
  SHA256:0524fe42951adc3a7eb870e32f0920313c71f170c859b5f770d82b4ee111e970

Output for a mirror that works:

Get:1 http://downloads.sourceforge.net/corefonts/andale32.exe [198 kB]
Fetched 198 kB in 2s (94,3 kB/s)

Output for a mirror that fails:

Err:1 http://downloads.sourceforge.net/corefonts/andale32.exe
  The HTTP server sent an invalid Content-Range header
E: Failed to fetch https://netcologne.dl.sourceforge.net/project/corefonts/the fonts/final/andale32.exe The HTTP server sent an invalid Content-Range header
E: Download Failed

Interestingly, running apt-helper with the redirected URL, after taking care to %-encode the space in the URL, works!

/usr/lib/apt/apt-helper \
  download-file \
  https://netcologne.dl.sourceforge.net/project/corefonts/the%20fonts/final/andale32.exe \
  /tmp/andale32.exe \
  SHA256:0524fe42951adc3a7eb870e32f0920313c71f170c859b5f770d82b4ee111e970

But it gets weirder!

Running the very same command (downloading again from netcologne) results in the "invalid Content-Range" failure. Removing the target file, the download works again.

Running the command for another mirror (netix instead of netcologne) first works (same as netcologne). But then, running the very same command results in a "Protocol "http" not supported or disabled in libcurl" error! Removing the target file, the download works again.

To summarize my findings:

* Running apt-helper on http://downloads.sourceforge.net/corefonts/andale32.exe most often fails (it seems to handle the redirect to the mirror, but maybe fails to encode the space in the redirect URL)
* Running apt-helper on the mirror URL (with %20 instead of space in the URL) works if and only if the target file on the local system does not exist
* Running apt-helper on the mirror URL when the target file already exists results in various mysterious errors

All in all, it looks to me like apt-helper is a bit broken.

apt-helper is part of the apt package. The version currently on my system is 1.2.15ubuntu0.2. It was updated from 1.2.15 to 1.2.15ubuntu0.2 on December 14th.