diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-06-08 14:04:50 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-06-08 14:04:50 +0000 |
commit | 2c20fde73996d802dac6fee4360bdecfc791e0ad (patch) | |
tree | 0b56884dbe1fa03f2e35a20a1b1fa6a9cafeb7d2 /ports-mgmt/pkg/files | |
parent | aabebce1542103e79ec893ce831e85095ccab54e (diff) | |
download | ports-2c20fde73996d802dac6fee4360bdecfc791e0ad.tar.gz ports-2c20fde73996d802dac6fee4360bdecfc791e0ad.zip |
Notes
Diffstat (limited to 'ports-mgmt/pkg/files')
-rw-r--r-- | ports-mgmt/pkg/files/patch-https-mirrors | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/files/patch-https-mirrors b/ports-mgmt/pkg/files/patch-https-mirrors new file mode 100644 index 000000000000..bf3f01c9f1af --- /dev/null +++ b/ports-mgmt/pkg/files/patch-https-mirrors @@ -0,0 +1,19 @@ +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 (strcmp(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) |