HTTP/1.1 Reference
Reference 为 HTTP/1.1 协议: 方法, headers, persistent connections, pipelining, 和 chunked 传输.
Protocol Features
HTTP/1.1 (RFC 9112) introduced persistent connections by default via Connection: keep-alive. Pipelining allows sending multiple requests without waiting for responses, though proxy support is poor. Chunked transfer encoding streams response bodies of unknown length. The Host header is mandatory, enabling virtual hosting. HTTP/1.1 defines content negotiation via Accept-* headers.
- keep-alive
- Persistent connections
- chunked
- Streaming bodies
- Host
- Mandatory header
default in 1.1 Transfer-Encoding: chunked virtual hosting Limitations
HTTP/1.1 suffers from head-of-line blocking: a slow response blocks subsequent requests on the same connection. Browsers work around this by opening 6 connections per origin. Text-based framing adds overhead and complexity. Headers are uncompressed, leading to significant overhead for cookies and metadata. These limitations motivated HTTP/2 and HTTP/3 development. Connection reuse helps but does not solve HOL blocking.
- HOL blocking
- Slow request blocks pipeline
- 6 connections
- Browser workaround
- text framing
- Overhead vs binary
per connection per origin uncompressed headers