HTTP/1.1 server built from raw TCP primitives. It includes a minimal request parser and response writer, plus a small demo app that proxies httpbin and serves a local video file.
- Basic HTTP/1.1 request parsing (request line, headers, optional body).
- HTTP response writer with status line + headers + body helpers.
- Chunked transfer encoding support, including trailers.
- Demo handler that:
- Proxies
/httpbin/*to https://httpbin.org with chunked encoding and trailers. - Serves
/videofromassets/vim.mp4withContent-Type: video/mp4. - Serves
/yourproblem,/myproblem, and a default success page.
- Proxies
go run ./cmd/httpserverThe server listens on http://127.0.0.1:42069.
# Default page
curl http://127.0.0.1:42069/
# HTTPBin proxy (chunked + trailers)
curl -i http://127.0.0.1:42069/httpbin/html
# Video file
curl -I http://127.0.0.1:42069/videogo test ./...