diff --git a/VERSION.txt b/VERSION.txt index f1520378a54..7a2c7cce44a 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -47,6 +47,7 @@ jetty-7.0.2.RC0 + Added IPAccessHandler + Updated Servlet3Continuation to final 3.0.20100224 + 305997 Coalesce buffers in ChannelEndPoint.flush() + + 306028 Enable TCP_NODELAY by default in client connectors jetty-7.0.1.v20091125 25 November 2009 + 274251 DefaultServlet supports exact match mode. diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java b/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java index d4464112d4f..5338746e43a 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java @@ -162,6 +162,7 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector, SocketChannel channel = SocketChannel.open(); Address address = destination.isProxied() ? destination.getProxy() : destination.getAddress(); channel.configureBlocking( false ); + channel.socket().setTcpNoDelay(true); channel.connect(address.toSocketAddress()); _selectorManager.register( channel, destination ); ConnectTimeout connectTimeout = new ConnectTimeout(channel, destination); @@ -211,7 +212,7 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector, protected void endPointClosed(SelectChannelEndPoint endpoint) { } - + @Override protected void endPointUpgraded(ConnectedEndPoint endpoint, Connection oldConnection) { diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/SocketConnector.java b/jetty-client/src/main/java/org/eclipse/jetty/client/SocketConnector.java index 0da8617f904..29a6f0492ab 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/SocketConnector.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/SocketConnector.java @@ -54,6 +54,9 @@ class SocketConnector extends AbstractLifeCycle implements HttpClient.Connector socket = SocketFactory.getDefault().createSocket(); } + socket.setSoTimeout(_httpClient.getSoTimeout()); + socket.setTcpNoDelay(true); + Address address = destination.isProxied() ? destination.getProxy() : destination.getAddress(); socket.connect(address.toSocketAddress(), _httpClient.getConnectTimeout()); @@ -73,7 +76,7 @@ class SocketConnector extends AbstractLifeCycle implements HttpClient.Connector { final Connection next = con.handle(); if (next!=con) - { + { con=next; continue; }