zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolivelli <...@git.apache.org>
Subject [GitHub] zookeeper pull request #652: ZOOKEEPER-3156: Add in option to canonicalize h...
Date Mon, 01 Oct 2018 20:35:59 GMT
Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/652#discussion_r221747922
  
    --- Diff: src/java/main/org/apache/zookeeper/ClientCnxn.java ---
    @@ -1102,7 +1103,32 @@ private void startConnect(InetSocketAddress addr) throws IOException
{
             private String getServerPrincipal(InetSocketAddress addr) {
                 String principalUserName = clientConfig.getProperty(ZKClientConfig.ZK_SASL_CLIENT_USERNAME,
                         ZKClientConfig.ZK_SASL_CLIENT_USERNAME_DEFAULT);
    -            String serverPrincipal = principalUserName + "/" + addr.getHostString();
    +            String hostName = addr.getHostName();
    +
    +            boolean canonicalize = true;
    +            try {
    +                canonicalize = Boolean.parseBoolean(System.getProperty(ZKClientConfig.ZK_SASL_CLIENT_CANONICALIZE_HOSTNAME,
    --- End diff --
    
    Isn't it clientConfig instead of System ?


---

Mime
View raw message