mirror of https://github.com/grpc/grpc-java.git
OkHttpClientTransportTest's proxy to use localhost
Fixes #8080. The address 0.0.0.0 (that comes from new Socket(0). .getLocalSocketAddress()) is for listening with a server, but it is not meant to be used as the destination address as per "3.2.1.3 Addressing" in RFC 1122
This commit is contained in:
parent
d25ebaf57d
commit
4ad49266ec
|
@ -1866,7 +1866,8 @@ public class OkHttpClientTransportTest {
|
|||
INITIAL_WINDOW_SIZE,
|
||||
HttpConnectProxiedSocketAddress.newBuilder()
|
||||
.setTargetAddress(targetAddress)
|
||||
.setProxyAddress(serverSocket.getLocalSocketAddress()).build(),
|
||||
.setProxyAddress(new InetSocketAddress("localhost", serverSocket.getLocalPort()))
|
||||
.build(),
|
||||
tooManyPingsRunnable,
|
||||
DEFAULT_MAX_INBOUND_METADATA_SIZE,
|
||||
transportTracer,
|
||||
|
@ -1923,7 +1924,8 @@ public class OkHttpClientTransportTest {
|
|||
INITIAL_WINDOW_SIZE,
|
||||
HttpConnectProxiedSocketAddress.newBuilder()
|
||||
.setTargetAddress(targetAddress)
|
||||
.setProxyAddress(serverSocket.getLocalSocketAddress()).build(),
|
||||
.setProxyAddress(new InetSocketAddress("localhost", serverSocket.getLocalPort()))
|
||||
.build(),
|
||||
tooManyPingsRunnable,
|
||||
DEFAULT_MAX_INBOUND_METADATA_SIZE,
|
||||
transportTracer,
|
||||
|
@ -1979,7 +1981,8 @@ public class OkHttpClientTransportTest {
|
|||
INITIAL_WINDOW_SIZE,
|
||||
HttpConnectProxiedSocketAddress.newBuilder()
|
||||
.setTargetAddress(targetAddress)
|
||||
.setProxyAddress(serverSocket.getLocalSocketAddress()).build(),
|
||||
.setProxyAddress(new InetSocketAddress("localhost", serverSocket.getLocalPort()))
|
||||
.build(),
|
||||
tooManyPingsRunnable,
|
||||
DEFAULT_MAX_INBOUND_METADATA_SIZE,
|
||||
transportTracer,
|
||||
|
|
Loading…
Reference in New Issue