-
Bug
-
Resolution: Obsolete
-
Major
-
None
HttpUpgradeConnectionProvider#createConnection creates an URI based on a given SocketAddress and the result of getHostName(). If the given SocketAddress is a loopback address – for example 127.254.254.254 – getHostName() will return the machine's host name. XNIO will use the host part of this URI to establish a connection and fails because the machine's host name resolves to a different IP address.
Changing the construction of the URI from
new URI("http", "", destination.getHostName(), destination.getPort(), "/", "", "")
to
new URI("http", "", destination.getAddress().getHostAddress(), destination.getPort(), "/", "", "")
will construct an URI based on an IP address and solve this issue.