libfetch: implement default port for HTTPS.
If getservbyname() fails, libfetch will attempt to connect to port 0.cute-signatures
parent
8b63e0fcfb
commit
ffcdd350d0
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue