You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Vandahl (JIRA)" <ji...@apache.org> on 2014/08/19 20:43:18 UTC

[jira] [Commented] (JCS-133) RemoteUtils.getNamingURL does not handle IPv6 numeric addresses properly

    [ https://issues.apache.org/jira/browse/JCS-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14102619#comment-14102619 ] 

Thomas Vandahl commented on JCS-133:
------------------------------------

An alternative would be to try to resolve the address and see if it is a IPv6 address. That, however, might trigger DNS timeouts (30 sec), which should be avoided IMO. I'm fine with the fix.

> RemoteUtils.getNamingURL does not handle IPv6 numeric addresses properly
> ------------------------------------------------------------------------
>
>                 Key: JCS-133
>                 URL: https://issues.apache.org/jira/browse/JCS-133
>             Project: Commons JCS
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: jcs-2.0.0
>
>
> The RemoteUtils.getNamingURL method does the following concatenation to produce the result:
> "//" + registryHost + ":" + registryPort + "/" + serviceName;
> This works fine for host names and IPv4, but does not work for literal IPv6 addresses which have to be enclosed in [ and ]
> A crude way to fix this would be to look for ":" in the registryHost string.
> If present, the zone index identifier (%2 or %eth0) needs to be encoded because the % is special.



--
This message was sent by Atlassian JIRA
(v6.2#6252)