Commit 8e993fe9 authored by Martin Vahlensieck's avatar Martin Vahlensieck Committed by Timo Teräs

Use correct port when redirected

If server redirects from http to https, libfetch detects this, but
wrongly uses the old url scheme to determine the port. This subsequently
leads to the following OpenSSL error:

139741541575496:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:331:

Using the new scheme fixes this.  This error message comes from trying
to connect to port 80 with TLS, it can also be observed by issuing
  $ openssl s_client -connect

This bug was introduced in commit:
7158474f libfetch: keep http auth only if redirect is for the same host
parent 361eb063
Pipeline #75153 passed with stage
in 1 minute and 9 seconds