From 8f87937b6b62ebf8616257882f9ad11e58fbbff2 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