You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ok2c (via GitHub)" <gi...@apache.org> on 2023/03/01 16:06:48 UTC

[GitHub] [httpcomponents-client] ok2c commented on a diff in pull request #418: Fix issue with LLv6 literals in URLs

ok2c commented on code in PR #418:
URL: https://github.com/apache/httpcomponents-client/pull/418#discussion_r1121977585


##########
httpclient5/src/main/java/org/apache/hc/client5/http/SystemDefaultDnsResolver.java:
##########
@@ -40,7 +40,14 @@ public class SystemDefaultDnsResolver implements DnsResolver {
 
     @Override
     public InetAddress[] resolve(final String host) throws UnknownHostException {
-        return InetAddress.getAllByName(host);
+        try {

Review Comment:
   @arturobernalg This approach has a substantial drawback: DNS lookup failures completely unrelated to LLv6 will not generate two DNS queries. For some applications it may be not a big deal but for some it may. What is the problem with always calling `#stripsIPv6ZoneId` prior to calling `InetAddress#getAllByName`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org