I have a custom HTTP server that implements the HTTP 1.1 protocol.
I have no problem using persistent connec开发者_C百科tions, however, I never receive 'Connection: Close' from IE ( I haven't tested other browsers. ) Instead, the 'receive' times out because it seems IE closes the connection.
What header from IE should I look for to gracefully close the connection?
The default setting of the "Connection" header in 1.1 is "keep-alive" when the header is not present. IE does not close the connection right away so it can utilize the same connection for subsequent requests, and then closes the connection after a timeout if you do not send any requests right away.
There is no requirement to have browser explicitly send Connection: Close. And it does timeouts in 60 seconds, which is defined in registry.
I don't see a problem to gracefully handle "manual" client disconnect.
精彩评论