Regarding to HTTP keep-alive how request timeout should be handled on client side? For example there is a flow:
- Client sends Request1;
- Client waits for 1 minute;
- Client assumes the Request1 failed and resends it, i.e. sends new Request2 = Request1;
- Server responds with Response1 (which is response for Request1);
- Client assumes this is a response to Request2 but can handle it because Request1 = Request2;
- Client sends Request3;
- Server responds with Response2 (which is response for Request2);
- Client assumes this is a response to Request3 and fails to handle it.
I couldn't find any info in specification. It says how to retry if connection was closed by server but nothing about the situation when request took too long to proceed.