pkg-download: fix fetching URLs with ? from PRIMARY/BACKUP
authorArnout Vandecappelle <arnout@mind.be>
Fri, 21 Oct 2016 20:27:15 +0000 (22:27 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 23 Oct 2016 12:51:16 +0000 (14:51 +0200)
commit8740f321fcd2b245e3585b319e2a87aa361656cd
treeced2436430d8f66579b0d563dd98a3fd3672699a
parent873d4019f7fb00f6a80592224236b3ba7d657865
pkg-download: fix fetching URLs with ? from PRIMARY/BACKUP

Some packages download files (especially patches) with a ? in the
URL. The ? marks the query part of the URL. However, the downloaded
file still contains the ? but from then on it doesn't designate a
query part anymore. Therefore, when fetching from PRIMARY or
BACKUP site over http, the server will report a 404 Not Found.

To fix, we need to replace the ? with %3F. Obviously, this should
be done only when fetching from PRIMARY or BACKUP. For fetching
from the real upstream, the ? really does designate the query part.

Fixes #9371.

Reported-by: Johan Derycke <johanderycke@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas: replace 'SECONDARY' by 'BACKUP'.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pkg-download.mk