Dispatch № 07 · http-server
HTTP Server
HTTP/1.1 server in pure Java
- Java
- Maven
- TCP Sockets
A lightweight HTTP/1.1 server written in pure Java with no web framework, built to understand the protocol from the socket up.
By the numbers
- Built an HTTP/1.1 server from scratch in pure Java with no frameworks: raw TCP sockets, request parsing, routing, and static file serving.
- Implemented the request and response lifecycle by hand, from status lines and headers to CRLF framing, to learn the protocol beneath the frameworks.
Why
Most web work happens several abstraction layers above the wire. I built this to peel those back: to handle a TCP connection, parse a raw request, and write a correct response by hand.
What it does
It opens a TCP socket, parses incoming HTTP/1.1 requests, routes them, handles GET and POST, and serves static files, composing status lines, headers, and bodies with correct CRLF framing.
Stack
Pure Java 23 with zero runtime dependencies, built with Maven. The entry point is a single threaded accept loop, kept deliberately minimal so the protocol stays visible.