From 76f5aa1f9a491fca4593290fa29e26c6753adb7a Mon Sep 17 00:00:00 2001 From: yangrui07 Date: Tue, 3 Sep 2019 15:42:55 +0800 Subject: [PATCH] agent support http download --- cube/cube-agent/src/agent/work.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cube/cube-agent/src/agent/work.go b/cube/cube-agent/src/agent/work.go index 8f722932..8fdd90a5 100644 --- a/cube/cube-agent/src/agent/work.go +++ b/cube/cube-agent/src/agent/work.go @@ -725,7 +725,7 @@ func DoDownloadIndividual(source, downloadDir string, isService bool, timeOut in func checkSources(source string) ([]string, error) { sources := strings.Split(source, ";") for i := 0; i < len(sources); i++ { - if sources[i] == "" || !strings.HasPrefix(sources[i], "ftp://") { + if sources[i] == "" || (!strings.HasPrefix(sources[i], "ftp://") && !strings.HasPrefix(sources[i], "http://")) { return sources, errors.New("Invalid sources") } } -- GitLab