mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-31 10:46:16 +00:00
Add a patch to fix grabbing mirror lists over https
Note that people are using mirror_type: http when they should not most probably due to bad documentation on our side so we will improve that later mirror_type: http is only useful if you actually host multiple mirror of your repos see pkg-repository(5).
This commit is contained in:
parent
aabebce154
commit
2c20fde739
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=416541
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= pkg
|
||||
DISTVERSION= 1.8.4
|
||||
PORTREVISION= 1
|
||||
_PKG_VERSION= ${DISTVERSION}
|
||||
CATEGORIES= ports-mgmt
|
||||
MASTER_SITES= \
|
||||
|
19
ports-mgmt/pkg/files/patch-https-mirrors
Normal file
19
ports-mgmt/pkg/files/patch-https-mirrors
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user