abuild-fetch: when http:// was used, ignore https:// problems

This commit is contained in:
tcely 2019-05-08 14:07:11 -04:00 committed by Natanael Copa
parent 7bd32679b3
commit 59c1c4a97a

View File

@ -135,7 +135,8 @@ int fetch(char *url, const char *destdir)
if (access(outfile, F_OK) == 0)
goto fetch_done;
if (insecure) {
/* enable insecure mode when http. This may be useful when it redirects to https */
if (insecure || strstr(url, "http://") == url) {
add_opt(&curlcmd, "--insecure");
add_opt(&wgetcmd, "--no-check-certificate");
}