Regarding to HTTP keep-alive how request timeout should be handled on client side? For example there is a flow:
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.
I have experience with ASP.NET though I'm not sure if this paradiagm is used for all HTTP pipelines. Here's what I understand:
HttpContext
that facilitates this. The new request comes in on a separate thread which has no safe context of any other requests. WebRequest
) the response is tied to that request. Therefore Request1
in your example could never be mixed up with Request2
. The keep-alive
that's used in the HTTP request header indicates that the underlying TCP connection shouldn't be closed so that it can be reused for other requests. As far as I understand, a single request timing out doesn't affect the underlying TCP connection; that is, even though the TCP connection is shared, the request-response mechanisms work as usual.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.