apt-helper download fails to download ttf-mscorefonts with certain redirects (blanks in URI)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
apt-helper does not process redirects properly, breaking ttf-mscorefonts
https:/
https:/
This doesn't happen with cURL or wget from the command line.
This trace reveals a bug in the generation of URIs through what appears to me improper processing of escaped space and unescaped URI encoded versions (%20), look for "GET /project/
This trace is generated with:
$ cat /etc/apt/apt.conf
Debug {
Acquire {
http "TRUE";
https "TRUE";
};
};
Failure trace:
$ LANGUAGE= LANG= LC_ALL=C /usr/lib/
0% [Working]GET /corefonts/
Host: downloads.
Range: bytes=198384-
If-Range: Thu, 15 Aug 2002 14:33:49 GMT
User-Agent: Debian APT-HTTP/1.3 (1.2.15)
Answer for: http://
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sun, 08 Jan 2017 15:02:59 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Location: http://
Content-Length: 178
0% [Working]GET /project/
Host: downloads.
Range: bytes=198384-
If-Range: Thu, 15 Aug 2002 14:33:49 GMT
User-Agent: Debian APT-HTTP/1.3 (1.2.15)
GET /project/
Host: downloads.
Range: bytes=198384-
If-Range: Thu, 15 Aug 2002 14:33:49 GMT
User-Agent: Debian APT-HTTP/1.3 (1.2.15)
Answer for: http://
HTTP/1.1 302 Found
Server: nginx
Date: Sun, 08 Jan 2017 15:03:00 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
content-
Set-Cookie: sf_mirror_
Location: https:/
Content-Length: 166
0% [Working]* Trying 2001:4dd0:
* Connected to netcologne.
* found 169 certificates in /etc/ssl/
* found 690 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_
* server certificate verification OK
* server certificate status verification SKIPPED
* common name: netcologne.
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: CN=netcologne.
* start date: Sun, 06 Nov 2016 19:27:00 GMT
* expire date: Sat, 04 Feb 2017 19:27:00 GMT
* issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
* compression: NULL
* ALPN, server did not agree to a protocol
> GET /project/
Host: netcologne.
User-Agent: Debian APT-CURL/1.0 (1.2.15)
Accept: */*
Cache-Control: max-age=0
Range: bytes=198384-
If-Range: Thu, 15 Aug 2002 14:33:49 GMT
< HTTP/1.1 302 Moved Temporarily
< Server: nginx/1.11.8
< Date: Sun, 08 Jan 2017 15:03:00 GMT
< Content-Type: text/html
< Content-Length: 161
< Connection: keep-alive
< Content-Range: bytes */198384
* Failed writing header
* Closing connection 0
Err:1 http://
The HTTP server sent an invalid Content-Range header
E: Failed to fetch https:/
E: Download Failed
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apt 1.2.15ubuntu0.2
ProcVersionSign
Uname: Linux 4.8.0-32-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.4
Architecture: amd64
CurrentDesktop: GNOME-Flashback
Date: Sun Jan 8 16:10:07 2017
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)
Duplicate of bug 1651923 - and the others too, of course.