From 48e07d0d22d4991d704add8482fc7990b5b620ca Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Thu, 9 Jan 2025 09:14:58 +0100 Subject: [PATCH] replace new URL Signed-off-by: Mark Herwege --- .../src/main/java/org/openhab/core/io/net/http/HttpUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }