diff options
author | Ariadne Conill <ariadne@dereferenced.org> | 2020-05-28 17:23:17 -0600 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-05-29 08:00:22 +0300 |
commit | ffcdd350d02fb51d91e83a153e58ddbb66bfeb31 (patch) | |
tree | f54aa7fb0386560879ee67700366bf23edcf47be /libfetch/common.c | |
parent | 8b63e0fcfb555b3e3fe8f0b96902da9c5b4e4582 (diff) | |
download | apk-tools-ffcdd350d02fb51d91e83a153e58ddbb66bfeb31.tar.gz apk-tools-ffcdd350d02fb51d91e83a153e58ddbb66bfeb31.tar.bz2 apk-tools-ffcdd350d02fb51d91e83a153e58ddbb66bfeb31.tar.xz apk-tools-ffcdd350d02fb51d91e83a153e58ddbb66bfeb31.zip |
libfetch: implement default port for HTTPS.
If getservbyname() fails, libfetch will attempt to connect to port 0.
Diffstat (limited to 'libfetch/common.c')
-rw-r--r-- | libfetch/common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libfetch/common.c b/libfetch/common.c index 9cbe32d..537715b 100644 --- a/libfetch/common.c +++ b/libfetch/common.c @@ -184,6 +184,8 @@ fetch_default_port(const char *scheme) return (FTP_DEFAULT_PORT); if (strcasecmp(scheme, SCHEME_HTTP) == 0) return (HTTP_DEFAULT_PORT); + if (strcasecmp(scheme, SCHEME_HTTPS) == 0) + return (HTTPS_DEFAULT_PORT); return (0); } |