After experimenting with my JBoss 5.1 server I noticed that the HTTP responses contain the Connection: close
header if the current thread is the last available one.
For instance if I set maxThreads="4"
in the HTTP connector config and perform more than 4 simulatenous requests, then:
- the 3 first responses do not contain any
Connection
header (meaning the connection can be reused by the client for future requests) - all the next requests contain the
Connection: close
header (meaning the client will have to create a new connection on a different port for the next request)
I could not find any documentation for that. Is this behaviour explained somewhere? And is it possible to avoid it (i.e prevent this Connection: close
header) so that clients can reuse the sockets for future requests?