opkg: encode archive filenames while constructing download URLs
authorJo-Philipp Wich <jo@mein.io>
Thu, 7 Dec 2017 10:43:02 +0000 (11:43 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Fri, 8 Dec 2017 12:46:46 +0000 (13:46 +0100)
commit793fbacfe0c731bfd5334fa711e1dd5f84603fa7
treecd34655c5d2f5ff56b2e56428cf1dd7bb3d09d45
parenta6bb5cb3751d0c01edc1d115201635a735c37a73
opkg: encode archive filenames while constructing download URLs

Various web servers, namely Amazon S3 ones, have problems handling requests
to URLs with a literal "+" in the path component.

According to the RFC 3986 "+" is a reserved char and its purpose is
delimiting. When used in a file name it should be encoded.

Use the new urlencode_path() helper to encode the path component before
constructing the final download URL.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Tested-by: Rafał Miłecki <rafal@milecki.pl>
libopkg/opkg.c
libopkg/opkg_download.c