8158690: GET request via HTTP/2 has a huge delays due to Nagle’s Algorithm and Delayed ACK clash
Reviewed-by: chegar
--- a/jdk/src/java.httpclient/share/classes/java/net/http/PlainHttpConnection.java Fri Jun 24 06:47:32 2016 +0100
+++ b/jdk/src/java.httpclient/share/classes/java/net/http/PlainHttpConnection.java Fri Jun 24 06:52:29 2016 +0100
@@ -128,6 +128,7 @@
this.chan = SocketChannel.open();
int bufsize = client.getReceiveBufferSize();
chan.setOption(StandardSocketOptions.SO_RCVBUF, bufsize);
+ chan.setOption(StandardSocketOptions.TCP_NODELAY, true);
} catch (IOException e) {
throw new InternalError(e);
}