diff --git a/pom.xml b/pom.xml index 620f57f..9838e2b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.bwssystems.HABridge ha-bridge - 3.5.0 + 3.5.1 jar HA Bridge @@ -192,6 +192,12 @@ ** + + org.eclipse.paho:org.eclipse.paho.client.mqttv3 + + ** + + 0) { @@ -1132,17 +1135,22 @@ public class HueMulator implements HueErrorStringSet { if(body != null && body.length() > 0) requestBody = new StringEntity(body, parsedContentType); } - + try { + theURI = new URI(url); + } catch (URISyntaxException e1) { + log.warn("Error creating URI http request: " + url + " with message: " + e1.getMessage()); + return null; + } try { if(HttpGet.METHOD_NAME.equalsIgnoreCase(httpVerb) || httpVerb == null) { - request = new HttpGet(url); + request = new HttpGet(theURI); }else if(HttpPost.METHOD_NAME.equalsIgnoreCase(httpVerb)){ - HttpPost postRequest = new HttpPost(url); + HttpPost postRequest = new HttpPost(theURI); if(requestBody != null) postRequest.setEntity(requestBody); request = postRequest; }else if(HttpPut.METHOD_NAME.equalsIgnoreCase(httpVerb)){ - HttpPut putRequest = new HttpPut(url); + HttpPut putRequest = new HttpPut(theURI); if(requestBody != null) putRequest.setEntity(requestBody); request = putRequest;