There are two headers relate to Http keep alive,
Connection: Keep-Alive
Keep-Alive: timeout=5, max=1000
Connection: Keep-Alive
or Keep-Alive: param
?I have above qustions is because:
Recently I observed a problem using http client. After 2 hours since last time client sends request, once client sends request it would never hear response from server. In order to find reason, I did:
Between the two requests, pcaps on both sides show that no one sends FIN. And server does not receive the second request. I think something is messed up with HTTP1.1 keep alive transmission.
For Questions 1 and 3, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive
For question 2, see: HTTP Keep Alive and TCP keep alive
If you have e.g. NAT between the client and server, 2 hours can be too long for an idle connection to stay functional, but then again if neither side sees a fin, then someone is not handling things according to spec.