This repository contains small, self-contained server implementations that demonstrate key features of HTTP/1.1, HTTP/2, and HTTP/3. The goal is to explore the evolution of the HTTP protocol and showcase how each version improves on its predecessors while maintaining backward compatibility.
- Persistent connections
- Chunked transfer encoding
- Host header handling
- Pipelining (optional)
- Multiplexed streams
- Header compression (HPACK)
- Stream prioritization
- Server push
- QUIC-based transport (UDP)
- Improved latency and connection establishment
- Multiplexing without head-of-line blocking
- Go (1.18 or later recommended)
- A modern browser or tools like
curl
/Postman
to test server behavior
-
Clone the repository:
git clone https://github.com/yourusername/http-showcase.git cd http-showcase
-
Run the server for a specific HTTP version:
-
HTTP/1.1:
go run ./http1.1/server.go
-
HTTP/2:
go run ./http2/server.go
-
HTTP/3:
go run ./http3/server.go
-
-
Test the server using a browser or tool.
http-showcase-servers/
├── http1.1/
│ └── server.go
├── http2/
│ └── server.go
└── http3/
└── server.go