summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortcely <tcely@users.noreply.github.com>2019-05-08 14:07:11 -0400
committerNatanael Copa <ncopa@alpinelinux.org>2019-07-17 12:02:13 +0000
commit59c1c4a97a57c224ba8df167b05d8951e3f81bc2 (patch)
tree0be33c76b7328ff603c1442ce4e833b127af8de4
parent7bd32679b3cf4d2fe1238759e67b43a69bfb41bf (diff)
downloadabuild-59c1c4a97a57c224ba8df167b05d8951e3f81bc2.tar.bz2
abuild-59c1c4a97a57c224ba8df167b05d8951e3f81bc2.tar.xz
abuild-fetch: when http:// was used, ignore https:// problems
-rw-r--r--abuild-fetch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/abuild-fetch.c b/abuild-fetch.c
index 1b9e4d0..cff8fe6 100644
--- a/abuild-fetch.c
+++ b/abuild-fetch.c
@@ -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");
}