The java.net.URI class does not parse hostnames with an underscore properly.
See a relevant OpenJDK bug report here https://bugs.openjdk.org/browse/JDK-8221675.
Their proposed workaround is
URI.toURL().getHost()
This pull request adds .toURL() calls.
Example code
final URI uri1 = new URI("https://iweb_1.mangapicgallery.com");
final URI uri2 = new URI("https://iweb1.mangapicgallery.com");
System.out.println("Host 1 " + uri1.getHost());
System.out.println("Host 1 " + uri1.toURL().getHost());
System.out.println("Host 2 " + uri2.getHost());
The
java.net.URI
class does not parse hostnames with an underscore properly. See a relevant OpenJDK bug report here https://bugs.openjdk.org/browse/JDK-8221675. Their proposed workaround isThis pull request adds
.toURL()
calls.Example code
Output