HTTP 0.9 to HTTP 1.1
- Server response only in HTML
- One request per TCP connection
- No headers in the response document
The server serves the whole document then disconnects the client, aka end the TCP connection. Also, the server does not store any information about the request after disconnection.
- The web browser evolved during this time
- Response object can be of any type, HTML, file, image or any other content type
- Allowed capabilities content-encoding, character set support, multi-part types, authorization, caching, proxy behaviors, date formats, and more
- Added improvements keepalive connections, chunked encoding transfers, byte-range requests, additional caching mechanisms, transfer encodings, and request pipelining.
- Multiple requests per TCP connection
- Close the connection once closed
- Saved time from syn, syn-ack, ack cycle and TCP slow start
In the simplest form HTTP connections are established between a user agent and a server, but there can be more complicated situations also.
Some server sitting between client and server which can modify requests.
It acts like a receiving agent that acts as a layer above servers, for example, AWS API gateway.
A tunnel acts as a relay point between two connections without changing the messages
Client ---> Tunnel A ---> Tunnel B ---> Tunnel C ---> Target server
Although HTTP uses TCP as the underlying protocol, it can use other protocols as well such as UDP.