summaryrefslogtreecommitdiff
path: root/net/sync
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2022-12-04 21:17:25 +0100
committerByteHamster <info@bytehamster.com>2022-12-04 21:17:25 +0100
commitace0724e5d64e760070be0ef3ff417ab709f5013 (patch)
tree77f1105b47271a70efc2b72d78af742adf37fde3 /net/sync
parent45137119811011eb41ed988407a314194d0db2c8 (diff)
downloadAntennaPod-ace0724e5d64e760070be0ef3ff417ab709f5013.zip
Convert nextcloud domains to Punycode
Diffstat (limited to 'net/sync')
-rw-r--r--net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/HostnameParser.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/HostnameParser.java b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/HostnameParser.java
index 7094ad241..8decf7fea 100644
--- a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/HostnameParser.java
+++ b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/HostnameParser.java
@@ -2,6 +2,7 @@ package de.danoeh.antennapod.net.sync;
import org.apache.commons.lang3.StringUtils;
+import java.net.IDN;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -18,7 +19,7 @@ public class HostnameParser {
Matcher m = URLSPLIT_REGEX.matcher(hosturl);
if (m.matches()) {
scheme = m.group(1);
- host = m.group(2);
+ host = IDN.toASCII(m.group(2));
if (m.group(3) == null) {
port = -1;
} else {
@@ -32,7 +33,7 @@ public class HostnameParser {
} else {
// URL does not match regex: use it anyway -> this will cause an exception on connect
scheme = "https";
- host = hosturl;
+ host = IDN.toASCII(hosturl);
port = 443;
}