问题
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