From c3bc8e25c831be4a844569ee431ef4dda60115ee Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Mon, 27 Oct 2014 16:09:41 +0000 Subject: [PATCH] Be consistent about host names in RouteSelector. Use the host specified by the address, and not URI.getHost(). bug: 18023709 Change-Id: I2c39c2ce89049130dc00047c8de6f214159144c0 --- .../java/com/squareup/okhttp/internal/http/RouteSelector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/okhttp/src/main/java/com/squareup/okhttp/internal/http/RouteSelector.java b/okhttp/src/main/java/com/squareup/okhttp/internal/http/RouteSelector.java index 719313bd1b36..c5a24b564a05 100644 --- a/okhttp/src/main/java/com/squareup/okhttp/internal/http/RouteSelector.java +++ b/okhttp/src/main/java/com/squareup/okhttp/internal/http/RouteSelector.java @@ -243,7 +243,7 @@ private void resetNextInetSocketAddress(Proxy proxy) throws UnknownHostException String socketHost; int socketPort; if (proxy.type() == Proxy.Type.DIRECT) { - socketHost = uri.getHost(); + socketHost = address.getUriHost(); socketPort = getEffectivePort(uri); } else { SocketAddress proxyAddress = proxy.address();