This project is a minimal HTTP/1.1 implementation in Go, built directly on top of the TCP socket API, following the RFC 9112 specification.
It’s intentionally barebones, written to explore the inner workings of HTTP from the ground up. Building it was an eye-opening experience that I’d recommend to any developer curious about how the web actually works beneath the abstractions.
- Understand how HTTP/1.1 operates at the transport layer
- Implement requests, responses, and headers manually
- Explore chunked transfer encoding and content delivery
- Reinforce networking fundamentals in Go
Clone the repository:
git clone https://github.com/maxBRT/httpfromtcpRun the server:
go run cmd/httpserver.goUse curl to test basic responses:
curl -v http://localhost:42069/anything
curl -v http://localhost:42069/yourproblem
curl -v http://localhost:42069/myproblemcurl -v http://localhost:42069/httpbin/stream/100Open this one directly in your browser:
http://localhost:42069/video
- The server uses manual TCP handling instead of
net/http. - Error handlers return simple HTML pages for 400, 500, and success responses.
- Ideal for learning, debugging, or experimenting with HTTP at a low level.
🙏 Acknowledgements
This project was developed as part of the Boot.dev HTTP protocol paid course by The Primeagen. The course guided the implementation and provided the foundational concepts behind this server.
