A fast, minimal, and extensible HTTP/1.1 server written in Go. Written as a hobby project to learn more about HTTP and Go.
- Static File Serving: Serves static files and directories with template support.
- Handler Collection per Path: Register handlers for different HTTP methods on each route.
- Common Response Headers: Automatic writing of common headers on every response.
- Compression: Brotli support for static content (see TODO for details).
- Connection Keep-Alive: Supports
Connection: keep-alivefor persistent connections. - Chunked Transfer Encoding: Supports chunked transfer responses using Go channels.
- Radix Tree Routing: Efficient path matching using a custom radix tree implementation.
- Clone the repo:
git clone https://github.com/yourusername/gophttp.git
cd gophttp- Build and run:
go run main.go- Test:
go test -tags test ./...You can either change main.go to fit your requirements or write your own implementation using HttpServer.
See TODO.md for a detailed list of planned features and improvements.
See LICENCE.md.
