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


##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/HttpClientBuilder.java:
##########
@@ -751,6 +766,26 @@ public CloseableHttpClient build() {
             }
         }
 
+        if (enableIDNConversion && schemePortResolver == null) {
+            // Load the public suffix list
+            final PublicSuffixMatcher publicSuffixMatcher = 
PublicSuffixMatcherLoader.getDefault();
+
+            schemePortResolver = new DefaultSchemePortResolver() {
+                @Override
+                public int resolve(final HttpHost host) {
+                    final String hostname = IDN.toASCII(host.getHostName());

Review Comment:
   @arturobernalg I am not sure I understand why host name conversion is 
necessary here. The purpose of the `SchemePortResolver` is to provide the 
default port for a protocol scheme: `http` -> 80, `https` -> 443, `myhttp` -> 
8888. Could you please give an example where the proposed host name translation 
is necessary?



-- 
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-unsubscr...@hc.apache.org

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


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

Reply via email to