Explorar o código

Fixed HDSv2 execute url escape bug

Toby Chui %!s(int64=3) %!d(string=hai) anos
pai
achega
53e188aad4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      mod/iot/hdsv2/hdsv2.go

+ 1 - 1
mod/iot/hdsv2/hdsv2.go

@@ -134,7 +134,7 @@ func (h *Handler) Execute(device *iot.Device, endpoint *iot.Endpoint, payload in
 
 	} else {
 		//Payload exists. Append it to the end with value=?
-		targetURL += "?value=" + payload.(string)
+		targetURL += "?value=" + url.QueryEscape(payload.(string))
 	}
 
 	result, err := tryGet(targetURL)