kpatelatwork edited a comment on pull request #10530:
URL: https://github.com/apache/kafka/pull/10530#issuecomment-825190538


   @tombentley and @C0urante  Thanks for the above comment.
   
    I peeked at the code for upgrading to Apache HttpClient and this seems like 
a big work especially around the SSL factory and other parameters. This has the 
potential to cause even bigger disruption. I am a new committer and the 
benefits of doing this upgrade don't seem worth it to me as this bug seems like 
a very corner case.  All we want to do is report a better error message to the 
user that he needs to fix the hostname.
   
   At this point, my suggestion is to pick between the below two choices:
   
   1. close the PR, given it's a corner case, and revisit in the future.
   2. Go back to the original PR where the plan was to validate the URL when 
Herder tries to forward the request to another node here 
https://github.com/kpatelatwork/kafka/blob/7c8fb346a976903cc67e66c4ccfe6cc9858b5048/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestClient.java#L107
 .   This would require parsing the URL to create a URI and see if the host is 
null then parse the host out of the URL.  I tried 
   `System.out.println(new 
java.net.URL("http://kafka_connect-0.dev-2:8080";).getHost());` 
   and it seems to do return the proper hostname that later we can validate 
using IDN class.  
   
   What do you think if we go #2 approach?
   


-- 
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.

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


Reply via email to