Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix mirorr type HTTP always trying to fetch over port 80
Baptiste Daroussin committed 9 years ago
commit 4823b62c9612bb2704324ca9444289c95b2102b9
parent def3dca
1 file changed +3 -1
modified libpkg/fetch.c
@@ -547,8 +547,10 @@ 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;
				snprintf(zone, sizeof(zone),
-
				    "%s://%s", u->scheme, u->host);
+
				    "%s://%s:%d", u->scheme, u->host, u->port);
				if (repo->http == NULL)
					gethttpmirrors(repo, zone);
				http_current = repo->http;