From ffcdd350d02fb51d91e83a153e58ddbb66bfeb31 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Thu, 28 May 2020 17:23:17 -0600 Subject: libfetch: implement default port for HTTPS. If getservbyname() fails, libfetch will attempt to connect to port 0. --- libfetch/common.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libfetch/common.c') 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); } -- cgit v1.2.3-70-g09d2