diff --git a/bundles/org.openhab.core.io.net/src/main/java/org/openhab/core/io/net/http/HttpUtil.java b/bundles/org.openhab.core.io.net/src/main/java/org/openhab/core/io/net/http/HttpUtil.java index d7ab50b5778..82d02334464 100644 --- a/bundles/org.openhab.core.io.net/src/main/java/org/openhab/core/io/net/http/HttpUtil.java +++ b/bundles/org.openhab.core.io.net/src/main/java/org/openhab/core/io/net/http/HttpUtil.java @@ -314,9 +314,9 @@ private static boolean shouldUseProxy(String urlString, String nonProxyHosts) { String givenHost = urlString; try { - URL url = new URL(urlString); + URL url = (new URI(urlString)).toURL(); givenHost = url.getHost(); - } catch (MalformedURLException e) { + } catch (MalformedURLException | URISyntaxException e) { LOGGER.error("the given url {} is malformed", urlString); }