开发者

HTTP header 'Connection: Close' not sent by IE

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜