- 版本:HTTP/1.1 和 一部分HTTP/1.0 (在1.0中未标准化,所以是部分)
- 持久连接:HTTP Persistent Connections,也称为 HTTP keep-alive 或 HTTP connection reuse)
- 只要任意一端没有明确断开连接,则保持TCP连接状态
Connection
Connection首部(请求头、Header)的作用:
1. 管理持久化连接
- 客户端明确 断开TCP连接
Response首部:
Connection: close
在HTTP/1.1之前版本维持 持续连接
Request首部:
Connection:Keep-Alive
Response首部:
Keep-Alive: timeout=10, max=500
Connection: Keep-Alive
2. 设置代理服务器转发request时,删除的首部