From 3c2b1a45d1608053e90949af13882e856e4db76b Mon Sep 17 00:00:00 2001 From: rainzm Date: Wed, 19 Jan 2022 11:20:59 +0800 Subject: [PATCH] fix(cloudcommon): splice notifyurl correctly --- pkg/cloudcommon/db/taskman/tasks.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/cloudcommon/db/taskman/tasks.go b/pkg/cloudcommon/db/taskman/tasks.go index c5064fd228..28ea4801a0 100644 --- a/pkg/cloudcommon/db/taskman/tasks.go +++ b/pkg/cloudcommon/db/taskman/tasks.go @@ -19,7 +19,6 @@ import ( "database/sql" "fmt" "net/http" - "path/filepath" "reflect" "runtime/debug" "strconv" @@ -831,7 +830,7 @@ func (task *STask) GetTaskRequestHeader() http.Header { header := mcclient.GetTokenHeaders(userCred) header.Set(mcclient.TASK_ID, task.GetTaskId()) if len(serviceUrl) > 0 { - notifyUrl := filepath.Join(serviceUrl, "tasks", task.GetTaskId()) + notifyUrl := fmt.Sprintf("%s/tasks/%s", serviceUrl, task.GetTaskId()) header.Set(mcclient.TASK_NOTIFY_URL, notifyUrl) } return header