您的位置:首页 > 理论基础 > 计算机网络

RT:How HTTP use TCP connection

2015-10-28 14:13 603 查看
In HTTP/0.9 (not used anymore), each request uses a separate TCP connection, and the end of a response is signalled by closing the connection.

In HTTP/1.0, an unofficial but very widely supported "
Connection: Keep-Alive
" request header can be used to request a persistent connection if the server supports it.

In HTTP/1.1, persistent connections are the default, and the old single-request behavior has to be requested explicitly.

Optionally requests may be pipelined, though this still has some disadvantages, so multiple (2–5) connections are often used.

HTTP/2 (aka SPDY) was specifically designed to multiplex many requests at the same time.

Resources: Wikipedia article and RFC 2616 section 8.1.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: