fix(cloudcommon): splice notifyurl correctly

This commit is contained in:
rainzm
2022-01-19 11:35:30 +08:00
parent 444e530683
commit 3c2b1a45d1
+1 -2
View File
@@ -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