]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commit
use protocol defined in server-list.db for mirror communication
authorPeter Müller <peter.mueller@link38.eu>
Wed, 28 Mar 2018 03:41:50 +0000 (05:41 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Mar 2018 15:42:21 +0000 (16:42 +0100)
commit66a0f3646ad2b1da568282464b9a63479c8b45d9
treea260c6cf2a7b061a49f9a61c5a1ce7ba4fb28e12
parent9f0999325dec7ffbcf8b18b846fbf6a8a6c5780f
use protocol defined in server-list.db for mirror communication

For each mirror server, a protocol can be specified in the
server-list.db database. However, it was not used for the
actual URL query to a mirror before.

This might be useful for deploy HTTPS pinning for Pakfire.
If a mirror is known to support HTTPS, all queries to it
will be made with this protocol.

This saves some overhead if HTTPS is enforced on a mirror
via 301 redirects. To enable this, the server-list.db
needs to be adjusted.

The second version of this patch only handles protocols
HTTP and HTTPS, since we do not expect anything else here
at the moment.

Partially fixes #11661.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/lib/functions.pl