Commit 586ea36d authored by Muhammad Umair Khan's avatar Muhammad Umair Khan
Browse files

fix(meep-sss-mgr): prepend CSE base to bare oneM2M To values

parent bc5acb25
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ import (
	"net/url"
	"reflect"
	"strconv"
	"strings"

	log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger"
	"github.com/gorilla/mux"
@@ -117,10 +118,14 @@ func (http_mgr *SssMgrHttp) send(p_ctx SssMgrBindingProtocolContext) (err error,
	headers["Content-Type"] = []string{s}
	// Build the URL
	var url string
	to := p_ctx.to
	if !strings.Contains(to, "/") && p_ctx.name != "" {
		to = p_ctx.name + "/" + to
	}
	if p_ctx.path != "" {
		url = "https://" + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + p_ctx.path + "/" + p_ctx.to
		url = "https://" + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + p_ctx.path + "/" + to
	} else {
		url = "https://" + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + p_ctx.to
		url = "https://" + p_ctx.host + ":" + strconv.Itoa(p_ctx.port) + "/" + to
	}
	// Set the method
	method := ""