Shouldn't the IIS send Keep-Alive header

安稳与你 提交于 2019-12-13 13:28:39

问题


I've enabled "HTTP keep-alive" in IIS 7.5 settings. But still, the IIS doesn't respond with Connection: keep-alive header (to both FF and Chrome)

As I noticed, Nginx responds with this header when I enable keep-alive on it.

Shouldn't the Connection: keep-alive header be sent by server in response to requests?


回答1:


In HTTP/1.1 persistent connections are the default:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8

In other words, IIS doesn't really need to (however Apache seems to always send it).

You could verify this with netstat or as I tend to do with tcpview (a small sysinternals tool which you can download from microsoft: http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx)




回答2:


It appears that IIS doesn't send the Connection: keep-alive. Still it doesn't close the connection and browser reuses it for further requests.



来源:https://stackoverflow.com/questions/12637473/shouldnt-the-iis-send-keep-alive-header

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!