From 69b86d7ef54e577c05b925318cc5362cdb2c85d0 Mon Sep 17 00:00:00 2001 From: chausman <chausman@nrao.edu> Date: Tue, 25 Apr 2023 09:37:55 -0600 Subject: [PATCH] make sure to encode image precursor url input properly --- apps/cli/executables/go/iiwf_trigger/pkg/ingest/get_info.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/cli/executables/go/iiwf_trigger/pkg/ingest/get_info.go b/apps/cli/executables/go/iiwf_trigger/pkg/ingest/get_info.go index d8e0a732b..f7b9674b0 100644 --- a/apps/cli/executables/go/iiwf_trigger/pkg/ingest/get_info.go +++ b/apps/cli/executables/go/iiwf_trigger/pkg/ingest/get_info.go @@ -26,6 +26,7 @@ import ( "io" "io/ioutil" "net/http" + "net/url" "path/filepath" ) @@ -38,6 +39,7 @@ type CapoInput struct { CapoProfile string } +//checkError /** * Check if an error happened and panic on it if so * @@ -79,7 +81,7 @@ func GetCalibrationLocator(imgSetPath string, input CapoInput) string { imgSet := filepath.Base(imgSetPath) // Make the REST call - lookupUrl := locatorEndpoint + imgSet + lookupUrl := locatorEndpoint + url.QueryEscape(imgSet) resp, err := http.Get(lookupUrl) checkError(err) -- GitLab