ceylon-herd
ceylon-herd copied to clipboard
Persistent connections
I see Herd is sending Connection: close
. Why aren't we using persistent connections?
We do ask for them?
In HTTP 1.1 you don't have to ask for a connection to be persistent, you have to ask for it to be not persistent (https://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.1.2). Because the server is sending Connection: close
it's forcing the client to open a new TCP connection for subsequent resources.
Given the java.net API there's a limited amount you can do to help it reuse connections (https://docs.oracle.com/javase/8/docs/technotes/guides/net/http-keepalive.html), but while the server is sending Connection: close
nothing the client does can make a difference, AFAIU.
But maybe there's a good reason... @FroMage?