Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix grabbing mirror types over https
Baptiste Daroussin committed 9 years ago
commit 86a6c5f0c9d835e7d58a302d53ece22ecbde029c
parent 9f8d323
1 file changed +6 -2
modified 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)