diff --git libpkg/fetch.c libpkg/fetch.c index 4804ad0..16ab9c7 100644 --- libpkg/fetch.c +++ libpkg/fetch.c @@ -549,8 +549,12 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, srv_current = repo->srv; } else if (repo != NULL && repo->mirror_type == HTTP && strncmp(u->scheme, "http", 4) == 0) { - if (u->port == 0) - u->port = 80; + if (u->port == 0) { + if (stcmp(u->scheme, "https") == 0) + u->port = 443; + else + u->port = 80; + } snprintf(zone, sizeof(zone), "%s://%s:%d", u->scheme, u->host, u->port); if (repo->http == NULL)