Commit ffcdd350 authored by Ariadne Conill's avatar Ariadne Conill 🐰 Committed by Timo Teräs

libfetch: implement default port for HTTPS.

If getservbyname() fails, libfetch will attempt to connect to port 0.
parent 8b63e0fc
Pipeline #20351 passed with stage
in 41 seconds
......@@ -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);
}
......
......@@ -34,6 +34,7 @@
#define FTP_DEFAULT_PORT 21
#define HTTP_DEFAULT_PORT 80
#define HTTPS_DEFAULT_PORT 443
#define FTP_DEFAULT_PROXY_PORT 21
#define HTTP_DEFAULT_PROXY_PORT 3128
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment