Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix mirorr type HTTP always trying to fetch over port 80
Baptiste Daroussin committed 10 years ago
commit 4823b62c9612bb2704324ca9444289c95b2102b9
parent def3dcaaa30a878429a22dd4b285c9521bc4d623
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;