There are two headers relate to Http keep alive,
Connection: Keep-Alive
Keep-Alive: timeout=5, max=1000
- Which side sends HTTP1.1 "Keep-Alive: param"?
- When client and server use HTTP1.1, will client send TCP keep alive probe?
- In order to use HTTP1.1 keep alive, must client set
Connection: Keep-Alive
orKeep-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:
- having tcpdump runs on both client and server sides.
- client sends one request (and receives response)
- wait for 2 hours
- client sends another request (but does not receive any response) <-- this is the problem.
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.